{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "view-in-github"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/gpt_oss_(20B)_Reinforcement_Learning_2048_Game.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Free Colab\"/></a>"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "hzPgFeIkZn9q"
      },
      "source": [
        "# Goal: Make GPT-OSS play games with Reinforcement Learning\n",
        "\n",
        "Our goal is to make GPT-OSS play the 2048 game with reinforcement learning, or a variant of it called [GRPO](https://arxiv.org/abs/2501.12948).\n",
        "\n",
        "We want the model to devise a strategy to play 2048, and we will run this strategy until we win or lose. We then reward the model if it created a good strategy (winning the game), and we'll penalize it (negative reward) if the strategy was a bad one.\n",
        "\n",
        "<img src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/f/f9/2048_win.png/500px-2048_win.png\" height=300 />"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "31KIMLJLnHET"
      },
      "source": [
        "# Installation\n",
        "We'll be using [Unsloth](https://github.com/unslothai/unsloth) to do RL on GPT-OSS 20B. Unsloth saves 70% VRAM usage and makes reinforcement learning 2 to 6x faster, which allows us to fit GPT-OSS RL in a free Google Colab instance."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "CGoDZwcunHEU"
      },
      "outputs": [],
      "source": [
        "%%capture\n",
        "import os, importlib.util\n",
        "!pip install --upgrade -qqq uv\n",
        "if importlib.util.find_spec(\"torch\") is None or \"COLAB_\" in \"\".join(os.environ.keys()):    \n",
        "    try: import numpy; get_numpy = f\"numpy=={numpy.__version__}\"\n",
        "    except: get_numpy = \"numpy\"\n",
        "    !uv pip install -qqq \\\n",
        "        \"torch>=2.8.0\" \"triton>=3.4.0\" {get_numpy} torchvision bitsandbytes \"transformers==4.56.2\" \\\n",
        "        \"unsloth_zoo[base] @ git+https://github.com/unslothai/unsloth-zoo\" \\\n",
        "        \"unsloth[base] @ git+https://github.com/unslothai/unsloth\" \\\n",
        "        git+https://github.com/triton-lang/triton.git@05b2c186c1b6c9a08375389d5efe9cb4c401c075#subdirectory=python/triton_kernels\n",
        "elif importlib.util.find_spec(\"unsloth\") is None:\n",
        "    !uv pip install -qqq unsloth\n",
        "!uv pip install --upgrade --no-deps transformers==4.56.2 tokenizers trl==0.22.2 unsloth unsloth_zoo"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "CcLYwLyQLADE"
      },
      "source": [
        "We'll load GPT-OSS 20B and set some parameters:\n",
        "* `max_seq_length = 768` The maximum context length of the model. Increasing it will use more memory, and 768 was the maximum we found to fit on a free 15GB Tesla T4 machine\n",
        "* `lora_rank = 4` The larger this number, the smarter the RL process, but the slower and more memory usage\n",
        "* `load_in_4bit = True` Uses quantization to reduce memory usage by 75% without reducing accuracy that much. `load_in_16bit` will be faster but will need a 80GB GPU (H100, B200)\n",
        "* `offload_embedding = True` New Unsloth optimization which moves the embedding to CPU RAM, reducing VRAM by 1GB."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 575,
          "referenced_widgets": [
            "abe2b0a2913d4633943f44333ae799f8",
            "2c40c6b846924200b29616a590af1672",
            "749e8407a901483c8b513a2fb71596c8",
            "7baca79d720c40b5a923b9717e28c982",
            "68ea891644ca4753a8e1bf278ff47e84",
            "06ab9eaa6f0f48c4b68cff1ca4b9f2fa",
            "d98c2b1e979b4929891a8ee0c11f55df",
            "ef01b874478b4bb497d31d2f8dd6145a",
            "d50ea8cded9848ffa18be1ae6a2559df",
            "ffabf89ecd9d48a5a3fc2a1c855ce080",
            "614c5332c7d045109102a329e7f69dfd",
            "caf742160db041a1b6c2cfdf78f2dc9a",
            "34a9e38b0b454a69a067d1ddadec7626",
            "263b7dc0b3fd465fac89b9266b19d526",
            "5b7af68130f04a63ad3efa3d9f602ebe",
            "2a6aa92676c74509b58373ca604c5b3b",
            "9c4d6839934b4b13952a850d2084d498",
            "c6a1decbc0e7421db622033214913cb9",
            "147743757c804b85af2ef194f5f84e6a",
            "2820e352ab004e818949acc31eb3888d",
            "80fa3aef5e2040d9904c6b87b7214ca0",
            "0f99489932aa409b94ba34764aff19b0",
            "6ab4e5676ad84807a126fffa99f7a0d4",
            "e61ef80398444c13bf7cd20ef21a5057",
            "5ebe7b4e4ed24c53b783ee46377c682d",
            "e0fdef0087bc4a91a11932a2d933c001",
            "596c2a62a635469eb74233ce00586a6f",
            "da4324e287e64e5ba98fc110693066df",
            "8c7c6bb04a3f4a1494b34529f95a195c",
            "51aaa109480d4ae6bd419aea689d22ee",
            "acf4e50a248342f68d26daef21baa419",
            "7d3379cbd27a4218a9d84c5a12f3bb88",
            "7841bc90b6a74120ab3e603c76332a01",
            "3f9b801b52da4eb79f730d87bea5c338",
            "b66c6ded549d4db8a2e5ea8e5016615c",
            "43da5073c3ad4e98a3ade17a0bb3b93d",
            "40365e2c9fef49148e4c93592d458afc",
            "7e9d5212fc7844f286e14b70cbf0bc7a",
            "77d34c0f1de548b4872208a063bb5017",
            "bf96e8666c224c26b0a01451d08e907a",
            "4513a73fa95b41b5b6edadc9143ba9c1",
            "792d75a7d18945e7972826ac5b2ac386",
            "2a6f43b64d164636a2d9708f0190f21b",
            "65c62d2198e64ee4a9e6547c2733135a",
            "219ca32ab51e4b4385b2c1026a78503a",
            "6c2ccfe3363b40b58fc26ea164d4ead4",
            "07f0420c4dfa477caccd7ae96551c2e4",
            "1c96edb2f7c948b9968b1239982af942",
            "d93be4994f104b6e99d89a9e73cd6abd",
            "4da21f53bf7f4e2d8132eb43e6ecc739",
            "735f70fac43449e3974de1b783d56d33",
            "ad75f887a140416abfca615b2fc3c385",
            "dee02a37a6f44f168546ee0077dc20d1",
            "ee23056662ad4b719b65005d776e0e72",
            "87765ca0996b403dbe29deef48d548bf",
            "8db5e86577744ff1a39c8e198eee5dd3",
            "4b9b3fe8dc764eedb9e18f166fe2f548",
            "cca95e973bc445d3811335debf7c446e",
            "e507a46b4c754d9a8aede2aac0d203bc",
            "751a46fbb8e24efabfb381a85c90fbe8",
            "87a808c4d4f54f719adcd29de7206e1b",
            "5f0b2a0e1953406b88af2c884904e2da",
            "2fa84865e9f14c1491402ef81517b4bd",
            "245590db7d374515a428ff4abbd25588",
            "e2973e6c02834a7c9f2f6ce5755f35f0",
            "48741bbdeccb459aa4eea9c61339764b",
            "1183d3f2ad3c4fb0af1d925b5f9e3efe",
            "9cc51d8029eb4217bc37daa918649692",
            "41f13d2f023e405180689e03bc2c32a1",
            "247484c0bf5945bcb4627b48928366c8",
            "14c0f20a9ab341ee966fe77815099ff0",
            "a219f3b89a34443abe612846676f9356",
            "152d7bf2a74f400db3d3ecaa719ef8d1",
            "36676899a61f4be4b631f6271f6ecec9",
            "77ecad9f150c430fa85f5833d97c42df",
            "cef064f1c55f41bf957fc4623260fdb4",
            "37cbe8800af04a42a0355922969b6393",
            "f8dacdab001d4db0b6b3776ac7d3634a",
            "5a59fb5f7acf4213847c985e66c9ee3c",
            "ae6d42fb84fc4984af1d4430acdcd3c9",
            "02d120e49f2c4f95a6090b1d8d521767",
            "8f1e6c36b84c4115a671dcb9ade41c8b",
            "81a728910a2341a785a6f252bbb371f7",
            "69a8d50f11244ba688c183d14d2395ec",
            "350f29f737534bfba4258bc31ec274a2",
            "9beac0680e3049dfafcb6ec185fd2265",
            "dbf5ed93dac646ed979fa7a8c569dfe3",
            "4db5ee5b7b674abba75fbce264e6dfa3",
            "0c0c96eeac664f339aa4511bf47087e2",
            "18451e19df5449b1853b5e13dacd19c5",
            "d864d29d02c54ecfaedd7b866a6df8c2",
            "7875163297284832a35aca84cbb105ce",
            "d42d8228ea1247a1a81bb99b18c4640c",
            "bcda4c9a48e943a6a0ef812fcd64a6db",
            "61e491b843c347b6b2a9948de7caf01d",
            "dee07d33b8de4c3b847fcff670e68102",
            "b07acf871a0a46f1889bfb439d13752b",
            "ba94310dc12a4a258205b14901ad3f94",
            "a93210a691414502ba3c2dff03ffb4ce",
            "fd2fe9ef6da64f72ab29d481d1739f5e",
            "dbfeea8ee2374b8c8fa70431c35f281f",
            "84d27c45065e426badbfcfcdc8ff16b6",
            "fa9ea0d3234e41689c827485d0360885",
            "4cb119127b404f46a53012c62d004e28",
            "d9020a2a2c8440db81d2cfdf0289b667",
            "04d39c4dda9f4a1bb01b8d6320032372",
            "4d67b10ec7794170addb4e968e20f170",
            "55ac5c2a82ee48fe988e1e4f26c168b0",
            "9a079a30b4ae4bbc80122faf83e0ad59",
            "acda8e7582934fecbbf854e66e23f698",
            "4fbc4cfe529d471ba85f3ae8e53b28d6",
            "a0d0fedc5bec4f5b943fddf9a954fbdf",
            "cab602573c6940919f93e59fe6f4838d",
            "51b8f4ce40f94ac39cf44d98f1522ec7",
            "32d6af64f2464cfb965671f2692b4e15",
            "e1e77d98b01f4376a6c075975c27571e",
            "6a47e60b10a6481b94aee021c8dbc7ba",
            "5657a84bf4b74710b2de1a54f9236e39",
            "7bd5d1beeb0e49e293d9f6b91bb6d7fb",
            "60ceb890b5644493a8886d91b9dac461",
            "40138ff29073407abb95f793509fc320",
            "0ac4d8e674804ad6bdc5f2d62f2e0d33",
            "7bfcd9acf29646db8b6123708d1ffe27",
            "5e88d6515f16475fb72d7c153422b591",
            "5e5b77dd649547f896ab306fccc94a4e",
            "a843fa23e6c94fb486bff8764574fdc5",
            "fd0ac7ed3d3146ec85913f4e05c4a2f6",
            "77204d81ff8f4ee585361a503fa647dc",
            "923653dfe90e475a9efa44baf98ba9a0",
            "62600092f8cc43f493b86b0169f67be1",
            "59e46bbe96df4b88ad31c09096ce0e0a",
            "8f5c7b88a2cc4b5abb0814c814833349"
          ]
        },
        "id": "DkIvEkIIkEyB",
        "outputId": "2f85e1d0-8810-4b41-b683-0c33578d991c"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "🦥 Unsloth: Will patch your computer to enable 2x faster free finetuning.\n",
            "🦥 Unsloth Zoo will now patch everything to make training faster!\n",
            "==((====))==  Unsloth 2025.10.1: Fast Gpt_Oss patching. Transformers: 4.56.2.\n",
            "   \\\\   /|    Tesla T4. Num GPUs = 1. Max memory: 14.741 GB. Platform: Linux.\n",
            "O^O/ \\_/ \\    Torch: 2.8.0+cu126. CUDA: 7.5. CUDA Toolkit: 12.6. Triton: 3.4.0\n",
            "\\        /    Bfloat16 = FALSE. FA [Xformers = None. FA2 = False]\n",
            " \"-____-\"     Free license: http://github.com/unslothai/unsloth\n",
            "Unsloth: Fast downloading is enabled - ignore downloading bars which are red colored!\n",
            "Unsloth: Using float16 precision for gpt_oss won't work! Using float32.\n"
          ]
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "abe2b0a2913d4633943f44333ae799f8",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "model.safetensors.index.json: 0.00B [00:00, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "caf742160db041a1b6c2cfdf78f2dc9a",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "Fetching 4 files:   0%|          | 0/4 [00:00<?, ?it/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "6ab4e5676ad84807a126fffa99f7a0d4",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "model-00001-of-00004.safetensors:   0%|          | 0.00/4.00G [00:00<?, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "3f9b801b52da4eb79f730d87bea5c338",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "model-00004-of-00004.safetensors:   0%|          | 0.00/1.16G [00:00<?, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "219ca32ab51e4b4385b2c1026a78503a",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "model-00002-of-00004.safetensors:   0%|          | 0.00/4.00G [00:00<?, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "8db5e86577744ff1a39c8e198eee5dd3",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "model-00003-of-00004.safetensors:   0%|          | 0.00/3.37G [00:00<?, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "1183d3f2ad3c4fb0af1d925b5f9e3efe",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "Loading checkpoint shards:   0%|          | 0/4 [00:00<?, ?it/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "f8dacdab001d4db0b6b3776ac7d3634a",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "generation_config.json:   0%|          | 0.00/165 [00:00<?, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Unsloth: Offloading embeddings to RAM to save 1.08 GB.\n"
          ]
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "0c0c96eeac664f339aa4511bf47087e2",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "tokenizer_config.json: 0.00B [00:00, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "fd2fe9ef6da64f72ab29d481d1739f5e",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "tokenizer.json:   0%|          | 0.00/27.9M [00:00<?, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "4fbc4cfe529d471ba85f3ae8e53b28d6",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "special_tokens_map.json:   0%|          | 0.00/446 [00:00<?, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "0ac4d8e674804ad6bdc5f2d62f2e0d33",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "chat_template.jinja: 0.00B [00:00, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "from unsloth import FastLanguageModel\n",
        "import torch\n",
        "max_seq_length = 768 # Can increase for longer RL output\n",
        "lora_rank = 4        # Larger rank = smarter, but slower\n",
        "model, tokenizer = FastLanguageModel.from_pretrained(\n",
        "    model_name = \"unsloth/gpt-oss-20b\", # unsloth/gpt-oss-20b-BF16 for H100s\n",
        "    max_seq_length = max_seq_length,\n",
        "    load_in_4bit = True,      # False for LoRA 16bit. Choose False on H100s\n",
        "    offload_embedding = True, # Reduces VRAM by 1GB\n",
        ")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "TfeUs-lQJDSq"
      },
      "source": [
        "To do efficient RL, we will use [LoRA](https://arxiv.org/abs/2106.09685), which allows us to only add 1 to 5% of extra weights to the model for finetuning purposes. This allows us to save memory usage by over 60%, and yet it retains good accuracy. Read Unsloth's [GPT-OSS RL Guide](https://docs.unsloth.ai/new/gpt-oss-reinforcement-learning) for more details."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "8rGa-o3HJCo1",
        "outputId": "6dc27dbf-0c60-4996-8e97-932aab7c14fb"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Unsloth: Making `model.base_model.model.model` require gradients\n"
          ]
        }
      ],
      "source": [
        "model = FastLanguageModel.get_peft_model(\n",
        "    model,\n",
        "    r = lora_rank, # Choose any number > 0 ! Suggested 8, 16, 32, 64, 128\n",
        "    target_modules = [\n",
        "        \"q_proj\", \"k_proj\", \"v_proj\", \"o_proj\",\n",
        "        \"gate_proj\", \"up_proj\", \"down_proj\",\n",
        "    ],\n",
        "    lora_alpha = lora_rank*2, # *2 speeds up training\n",
        "    use_gradient_checkpointing = \"unsloth\", # Reduces memory usage\n",
        "    random_state = 3407,\n",
        ")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "N0QnO9_YJBOI"
      },
      "source": [
        "# 2048 game\n",
        "\n",
        "We used GPT-5 to create a variant of the 2048 game. It should output the current game board state, and allow us to advance the game board state with 1 action (up, down, left, right)."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "cellView": "form",
        "id": "D9CI4jtgL5mw"
      },
      "outputs": [],
      "source": [
        "#@title (Collapsible) 2048 Game Implementation\n",
        "from dataclasses import dataclass, field\n",
        "from typing import List, Tuple, Optional\n",
        "import random\n",
        "import copy\n",
        "\n",
        "def _compress_and_merge_row_left(row: List[int]) -> Tuple[List[int], int, bool]:\n",
        "    n = len(row)\n",
        "    tiles = [x for x in row if x != 0]\n",
        "    gained = 0\n",
        "    i = 0\n",
        "    merged = []\n",
        "    while i < len(tiles):\n",
        "        if i + 1 < len(tiles) and tiles[i] == tiles[i + 1]:\n",
        "            v = tiles[i] * 2\n",
        "            gained += v\n",
        "            merged.append(v)\n",
        "            i += 2\n",
        "        else:\n",
        "            merged.append(tiles[i])\n",
        "            i += 1\n",
        "    merged += [0] * (n - len(merged))\n",
        "    changed = merged != row\n",
        "    return merged, gained, changed\n",
        "\n",
        "def _move_left(board: List[List[int]]) -> Tuple[List[List[int]], int, bool]:\n",
        "    changed_any = False\n",
        "    total_gain = 0\n",
        "    new_board = []\n",
        "    for row in board:\n",
        "        new_row, gained, changed = _compress_and_merge_row_left(row)\n",
        "        new_board.append(new_row)\n",
        "        total_gain += gained\n",
        "        changed_any = changed_any or changed\n",
        "    return new_board, total_gain, changed_any\n",
        "\n",
        "def _move_right(board: List[List[int]]) -> Tuple[List[List[int]], int, bool]:\n",
        "    changed_any = False\n",
        "    total_gain = 0\n",
        "    new_board = []\n",
        "    for row in board:\n",
        "        rev = list(reversed(row))\n",
        "        new_rev, gained, changed = _compress_and_merge_row_left(rev)\n",
        "        new_row = list(reversed(new_rev))\n",
        "        new_board.append(new_row)\n",
        "        total_gain += gained\n",
        "        changed_any = changed_any or changed\n",
        "    return new_board, total_gain, changed_any\n",
        "\n",
        "def _transpose(board: List[List[int]]) -> List[List[int]]:\n",
        "    return [list(row) for row in zip(*board)]\n",
        "\n",
        "def _move_up(board: List[List[int]]) -> Tuple[List[List[int]], int, bool]:\n",
        "    t = _transpose(board)\n",
        "    moved, gain, changed = _move_left(t)\n",
        "    return _transpose(moved), gain, changed\n",
        "\n",
        "def _move_down(board: List[List[int]]) -> Tuple[List[List[int]], int, bool]:\n",
        "    t = _transpose(board)\n",
        "    moved, gain, changed = _move_right(t)\n",
        "    return _transpose(moved), gain, changed\n",
        "\n",
        "def _empty_cells(board: List[List[int]]) -> List[Tuple[int, int]]:\n",
        "    size = len(board)\n",
        "    return [(r, c) for r in range(size) for c in range(size) if board[r][c] == 0]\n",
        "\n",
        "def _can_move(board: List[List[int]]) -> bool:\n",
        "    if _empty_cells(board):\n",
        "        return True\n",
        "    size = len(board)\n",
        "    for r in range(size):\n",
        "        for c in range(size - 1):\n",
        "            if board[r][c] == board[r][c + 1]:\n",
        "                return True\n",
        "    for r in range(size - 1):\n",
        "        for c in range(size):\n",
        "            if board[r][c] == board[r + 1][c]:\n",
        "                return True\n",
        "    return False\n",
        "\n",
        "@dataclass\n",
        "class GameBoard:\n",
        "    size: int\n",
        "    seed: Optional[int] = None\n",
        "    target: int = 2048\n",
        "    probability_fours: float = 0.10 # originally spawns (4) 10% of the time!\n",
        "    _rng: random.Random = field(init=False, repr=False)\n",
        "    _board: List[List[int]] = field(init=False, repr=False)\n",
        "    _score: int = field(default=0, init=False, repr=False)\n",
        "    _state: str = field(default=\"ongoing\", init=False, repr=False)\n",
        "\n",
        "    def __post_init__(self):\n",
        "        if self.size < 2:\n",
        "            raise ValueError(\"Board size must be at least 2.\")\n",
        "        self._rng = random.Random(self.seed)\n",
        "        self._board = [[0 for _ in range(self.size)] for _ in range(self.size)]\n",
        "        self._add_random_tile()\n",
        "        self._add_random_tile()\n",
        "        self._update_state_after_change()\n",
        "\n",
        "    class _BoardView:\n",
        "        def __init__(self, game: \"GameBoard\"):\n",
        "            self._game = game\n",
        "        def __iter__(self):\n",
        "            return iter(self._game._board)\n",
        "        def __len__(self):\n",
        "            return len(self._game._board)\n",
        "        def __getitem__(self, idx):\n",
        "            return self._game._board[idx]\n",
        "        def __repr__(self) -> str:\n",
        "            return repr(self._game._board)\n",
        "        __str__ = __repr__\n",
        "        def do_action(self, key: str) -> None:\n",
        "            self._game.do_action(key)\n",
        "        def state(self) -> str:\n",
        "            return self._game.state()\n",
        "        def pretty(self, colors: bool = True, border: bool = True, dot_for_zero: bool = True) -> str:\n",
        "            return self._game._render_pretty(colors=colors, border=border, dot_for_zero=dot_for_zero)\n",
        "\n",
        "    def board(self) -> \"_BoardView\":\n",
        "        return GameBoard._BoardView(self)\n",
        "    def state(self) -> str:\n",
        "        return self._state\n",
        "    def score(self) -> int:\n",
        "        return self._score\n",
        "    def do_action(self, key: str) -> None:\n",
        "        if self._state != \"ongoing\":\n",
        "            return\n",
        "        if not isinstance(key, str) or len(key) == 0:\n",
        "            self._state = \"failed\"\n",
        "            return\n",
        "        k = key.strip().lower()\n",
        "        if k == \"q\":\n",
        "            self._state = \"failed\"\n",
        "            return\n",
        "        move_map = {\"a\": _move_left, \"d\": _move_right, \"w\": _move_up, \"s\": _move_down}\n",
        "        if k not in move_map:\n",
        "            self._state = \"failed\"\n",
        "            return\n",
        "        mover = move_map[k]\n",
        "        new_board, gain, changed = mover(self._board)\n",
        "        if changed:\n",
        "            self._board = new_board\n",
        "            self._score += gain\n",
        "            self._add_random_tile()\n",
        "        self._update_state_after_change()\n",
        "    def _add_random_tile(self) -> bool:\n",
        "        empties = _empty_cells(self._board)\n",
        "        if not empties:\n",
        "            return False\n",
        "        r, c = self._rng.choice(empties)\n",
        "        self._board[r][c] = 4 if self._rng.random() < self.probability_fours else 2\n",
        "        return True\n",
        "    def _update_state_after_change(self) -> None:\n",
        "        if any(self.target in row for row in self._board):\n",
        "            self._state = \"success\"\n",
        "            return\n",
        "        if not _can_move(self._board):\n",
        "            self._state = \"failed\"\n",
        "            return\n",
        "        self._state = \"ongoing\"\n",
        "    def _render_pretty(self, colors: bool = True, border: bool = True, dot_for_zero: bool = True) -> str:\n",
        "        \"\"\"\n",
        "        Pretty-print the board with colors that scale from 0 up to self.target.\n",
        "        Uses ANSI 256-color codes (works in most terminals). Set colors=False to disable.\n",
        "        \"\"\"\n",
        "        import math\n",
        "\n",
        "        b = self._board\n",
        "        mx = max((max(row) for row in b), default=0)\n",
        "        cell_w = max(3, len(str(mx)))\n",
        "\n",
        "        RESET = \"\\x1b[0m\"\n",
        "\n",
        "        # A smooth-ish gradient from cool → warm\n",
        "        # (blue/cyan/green → yellow/orange/red). Tweak or expand as you like.\n",
        "        GRAD = [33, 39, 45, 51, 50, 49, 48, 47, 46, 82, 118, 154, 190, 226, 220, 214, 208, 202, 196]\n",
        "        ZERO_FG = 239  # dim gray\n",
        "\n",
        "        def color_code(v: int) -> str:\n",
        "            if not colors:\n",
        "                return \"\"\n",
        "            if v == 0:\n",
        "                return f\"\\x1b[38;5;{ZERO_FG}m\"\n",
        "            # Normalize by exponent relative to target: r in [0,1]\n",
        "            t = max(2, self.target)  # safety; avoid log2(1)\n",
        "            # Guard: if v is not a power of two or is <1, handle gracefully\n",
        "            try:\n",
        "                r = max(0.0, min(1.0, math.log2(v) / math.log2(t)))\n",
        "            except ValueError:\n",
        "                r = 0.0\n",
        "            idx = int(round(r * (len(GRAD) - 1)))\n",
        "            return f\"\\x1b[38;5;{GRAD[idx]}m\"\n",
        "\n",
        "        def fmt(v: int) -> str:\n",
        "            s = \".\" if (v == 0 and dot_for_zero) else str(v)\n",
        "            s = s.rjust(cell_w)\n",
        "            return color_code(v) + s + (RESET if colors else \"\")\n",
        "\n",
        "        def hline(left: str, mid: str, right: str) -> str:\n",
        "            return left + mid.join(\"─\" * cell_w for _ in range(self.size)) + right\n",
        "\n",
        "        rows = []\n",
        "        if border:\n",
        "            rows.append(hline(\"┌\", \"┬\", \"┐\"))\n",
        "        for r in range(self.size):\n",
        "            content = \"│\".join(fmt(v) for v in b[r])\n",
        "            rows.append((\"│\" + content + \"│\") if border else content)\n",
        "            if border:\n",
        "                rows.append(hline(\"└\" if r == self.size - 1 else \"├\",\n",
        "                                \"┴\" if r == self.size - 1 else \"┼\",\n",
        "                                \"┘\" if r == self.size - 1 else \"┤\"))\n",
        "        return \"\\n\".join(rows)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "4BcaLniVKLpa"
      },
      "source": [
        "For example let's create a board of size 5 X 5 and set the target to 8 instead of 2048.\n",
        "\n",
        "**[NOTE]** 2048 originally spawns a (4) 10% of the time! We can disable this for harder games. See [Wikipedia page](https://en.wikipedia.org/wiki/2048_(video_game)) for more details."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "-M8kGaFRJ2ic",
        "outputId": "fad6c36b-cb16-490f-ad4f-6bf998dd24ab"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "┌───┬───┬───┬───┬───┐\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;48m  2\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;48m  2\u001b[0m│\n",
            "└───┴───┴───┴───┴───┘ ongoing\n"
          ]
        }
      ],
      "source": [
        "game = GameBoard(size = 5, seed = 42, target = 8, probability_fours = 0.10)\n",
        "print(game.board().pretty(), game.state())"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "zclUeNxosv4k",
        "outputId": "ad099448-d1f2-4471-cbc1-f463293e06ba"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "GameBoard(size=5, seed=42, target=8, probability_fours=0.1)"
            ]
          },
          "execution_count": 6,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "game"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "envzrXmjKRff"
      },
      "source": [
        "We'll use WASD for the action space:\n",
        "\n",
        "```\n",
        "   W\n",
        "A  S  D\n",
        "```\n",
        "Also `game.state()` will say `success` if we succeeded in getting the target!"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "b-gSgthFI_wq",
        "outputId": "68af4e66-80c8-4fa0-c7f3-e9ba22923494"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "┌───┬───┬───┬───┬───┐\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;48m  2\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;190m  4\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "└───┴───┴───┴───┴───┘ ongoing\n"
          ]
        }
      ],
      "source": [
        "game.do_action(\"A\")\n",
        "print(game.board().pretty(), game.state())"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "lUDdHKAxvZf8",
        "outputId": "38692fcc-bfa9-47b3-82f8-09bee2842d38"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "┌───┬───┬───┬───┬───┐\n",
            "│\u001b[38;5;190m  4\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;48m  2\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;48m  2\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "└───┴───┴───┴───┴───┘ ongoing\n"
          ]
        }
      ],
      "source": [
        "game.do_action(\"W\")\n",
        "print(game.board().pretty(), game.state())"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "wkTHxvvUvcmO",
        "outputId": "f9447b03-b0eb-443e-e139-607f231c76fe"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "┌───┬───┬───┬───┬───┐\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;190m  4\u001b[0m│\u001b[38;5;48m  2\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;48m  2\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;190m  4\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "└───┴───┴───┴───┴───┘ ongoing\n"
          ]
        }
      ],
      "source": [
        "game.do_action(\"D\")\n",
        "print(game.board().pretty(), game.state())"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "XO8vlL-4vd-K",
        "outputId": "a6f786bf-39d5-4a23-d79b-17ea9e94272c"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "┌───┬───┬───┬───┬───┐\n",
            "│\u001b[38;5;190m  4\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;190m  4\u001b[0m│\u001b[38;5;190m  4\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;190m  4\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "└───┴───┴───┴───┴───┘ ongoing\n"
          ]
        }
      ],
      "source": [
        "game.do_action(\"W\")\n",
        "print(game.board().pretty(), game.state())"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "MEa2ngmrvfNm",
        "outputId": "c27d9fca-55a0-42c4-dae5-bf8e402d7295"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "┌───┬───┬───┬───┬───┐\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;48m  2\u001b[0m│\u001b[38;5;190m  4\u001b[0m│\u001b[38;5;196m  8\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;190m  4\u001b[0m│\n",
            "├───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "└───┴───┴───┴───┴───┘ success\n"
          ]
        }
      ],
      "source": [
        "game.do_action(\"D\")\n",
        "print(game.board().pretty(), game.state())"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "gGL1X29Fy4n5"
      },
      "source": [
        "If we do some other action that's not part of the action space, we will get an error, and the game will not accept anymore actions."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "VZeIHbqoy7yn",
        "outputId": "11d15a8f-f09d-4833-8ef7-3bad0510e618"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "┌───┬───┬───┐\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;190m  4\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;48m  2\u001b[0m│\n",
            "├───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "└───┴───┴───┘ failed\n"
          ]
        }
      ],
      "source": [
        "game = GameBoard(size = 3, seed = 42, target = 8, probability_fours = 0.10)\n",
        "game.do_action(\"AA\") # Not in WASD\n",
        "game.do_action(\"W\")  # Doesn't do anything\n",
        "game.do_action(\"A\")  # Doesn't do anything\n",
        "print(game.board().pretty(), game.state())"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "VR6czU96cpxf"
      },
      "source": [
        "# RL Environment Setup\n",
        "\n",
        "We'll set up a function to accept some strategy that'll emit an action within `WASD` and check the game state.\n",
        "\n",
        "We'll also add a timer to only execute the stratgegy for 2 seconds maximum, otherwise it might never terminate!"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "tdgjnf-8z_kr"
      },
      "outputs": [],
      "source": [
        "from typing import Callable\n",
        "from unsloth import execute_with_time_limit\n",
        "\n",
        "def _execute_strategy(strategy : Callable, game : GameBoard):\n",
        "    assert callable(strategy)\n",
        "\n",
        "    steps = 0\n",
        "    while game.state() == \"ongoing\":\n",
        "        action = strategy(list(game.board()))\n",
        "        steps += 1\n",
        "        if type(action) is not str:\n",
        "            return steps, \"failed\"\n",
        "        game.do_action(action)\n",
        "    return steps, game.state()\n",
        "\n",
        "@execute_with_time_limit(2)\n",
        "def execute_strategy(strategy : Callable, game : GameBoard):\n",
        "    return _execute_strategy(strategy, game)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "ywh0HizI9ayE"
      },
      "source": [
        "Let's make a generic strategy to just hit `W`. We should expect this generic strategy to fail:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "5bkhqoZc0IO8",
        "outputId": "149e18be-dae2-4382-817a-620e7b40ebde"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Timed out with error = Timed out after 2s\n"
          ]
        }
      ],
      "source": [
        "def always_move_left(board):\n",
        "    return \"W\"\n",
        "\n",
        "game = GameBoard(size = 8, seed = 42, target = 2048, probability_fours = 0.10)\n",
        "try:\n",
        "    execute_strategy(always_move_left, game)\n",
        "except TimeoutError as e:\n",
        "    print(f\"Timed out with error = {str(e)}\")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "dkuHVdB09sgf"
      },
      "source": [
        "To allow longer strategies for GPT-OSS Reinforcement Learning, we shall allow a 5 second timer."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "SK-LfzsA9wbW"
      },
      "outputs": [],
      "source": [
        "@execute_with_time_limit(5)\n",
        "def execute_strategy(strategy : Callable, game : GameBoard):\n",
        "    return _execute_strategy(strategy, game)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "tRhLV_bZMYxy"
      },
      "source": [
        "# Code Execution\n",
        "\n",
        "To execute and create a new Python function, we first have to check if the function does not call other global variables or cheat. This is called `countering reward hacking` since we don't want the function to cheat.\n",
        "\n",
        "For example the below piece of code is fine, since it only imports Python level functions. We use `check_python_modules`:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "zz80kvg6M4BG",
        "outputId": "f13fdc0d-ddb3-4c4a-cf65-805dfb31dddd"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Only Python imports? True\n",
            "{'stdlib': ['math', 'typing'], 'non_stdlib': [], 'relative_imports': 0}\n"
          ]
        }
      ],
      "source": [
        "from unsloth import check_python_modules\n",
        "\n",
        "sample = \"\"\"\n",
        "def strategy(board):\n",
        "    import math\n",
        "    from typing import Callable\n",
        "    return \"W\"\n",
        "\"\"\"\n",
        "ok, info = check_python_modules(sample)\n",
        "print(\"Only Python imports?\", ok)\n",
        "print(info)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "bZzVWgKQ-VIg"
      },
      "source": [
        "For the below piece of code, since we import `numpy`, we should not allow the execution:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "Z89Jw1KB-Ux7",
        "outputId": "1a4cc701-1677-44b9-d44e-3f3f6dfed8d2"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Only Python imports? False\n",
            "{'stdlib': [], 'non_stdlib': ['numpy'], 'relative_imports': 0}\n"
          ]
        }
      ],
      "source": [
        "sample = \"\"\"\n",
        "def strategy(board):\n",
        "    from numpy import matmul\n",
        "    return \"W\"\n",
        "\"\"\"\n",
        "ok, info = check_python_modules(sample)\n",
        "print(\"Only Python imports?\", ok)\n",
        "print(info)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "SDSrjOTLVyQm"
      },
      "source": [
        "We also disallow global variable access. We'll use Unsloth's `create_locked_down_function` function\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "GcmYAmohVqw2",
        "outputId": "bbfcbbb5-8063-42fe-b349-964554317ab8"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "name 'np' is not defined\n"
          ]
        }
      ],
      "source": [
        "from unsloth import create_locked_down_function\n",
        "function = \"\"\"\n",
        "def import_numpy():\n",
        "    np.matmul\n",
        "    print(\"Success\")\n",
        "\"\"\"\n",
        "f = create_locked_down_function(function)\n",
        "try:\n",
        "    f()\n",
        "except Exception as e:\n",
        "    print(str(e))"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "5tJKwLUgZsRq",
        "outputId": "13588c11-6685-4627-b2d4-445bff9799c8"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "60\n"
          ]
        }
      ],
      "source": [
        "from unsloth import create_locked_down_function\n",
        "function = \"\"\"\n",
        "def add(a, b):\n",
        "    def adder(a):\n",
        "        return a + b\n",
        "    return adder(b) + b\n",
        "\"\"\"\n",
        "f = create_locked_down_function(function)\n",
        "try:\n",
        "    print(f(10, 20))\n",
        "except Exception as e:\n",
        "    print(str(e))"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "8CzwCyXIPK04"
      },
      "source": [
        "# Data & RL task setup\n",
        "\n",
        "We now have to create a prompt to tell the model to create a strategy for the 2048 game. You can customize this to some other task for another RL task."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "B-2RRE4HMrQO",
        "outputId": "332255d7-1e6a-4cb4-9ede-c8a2f01378fe"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Create a new short 2048 strategy using only native Python code.\n",
            "You are given a list of list of numbers for the current board state.\n",
            "Output one action for \"W\", \"A\", \"S\", \"D\" on what is the optimal next step.\n",
            "Output your new short function in backticks using the format below:\n",
            "```python\n",
            "def strategy(board):\n",
            "    return \"W\" # Example\n",
            "```\n",
            "All helper functions should be inside def strategy. Only output the short function `strategy`.\n"
          ]
        }
      ],
      "source": [
        "prompt = \"\"\"\n",
        "Create a new short 2048 strategy using only native Python code.\n",
        "You are given a list of list of numbers for the current board state.\n",
        "Output one action for \"W\", \"A\", \"S\", \"D\" on what is the optimal next step.\n",
        "Output your new short function in backticks using the format below:\n",
        "```python\n",
        "def strategy(board):\n",
        "    return \"W\" # Example\n",
        "```\n",
        "All helper functions should be inside def strategy. Only output the short function `strategy`.\n",
        "\"\"\".strip()\n",
        "print(prompt)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "MIdudFUodN4i"
      },
      "source": [
        "First, let's prompt GPT-OSS without RL and see how it goes:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "9HJxrS76h3Ds",
        "outputId": "fcfe2220-fc72-4af7-f8a1-f243311b0156"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "<|start|>system<|message|>You are ChatGPT, a large language model trained by OpenAI.\n",
            "Knowledge cutoff: 2024-06\n",
            "Current date: 2025-10-05\n",
            "\n",
            "Reasoning: low\n",
            "\n",
            "# Valid channels: analysis, commentary, final. Channel must be included for every message.\n",
            "Calls to these tools must go to the commentary channel: 'functions'.<|end|><|start|>user<|message|>Create a new short 2048 strategy using only native Python code.\n",
            "You are given a list of list of numbers for the current board state.\n",
            "Output one action for \"W\", \"A\", \"S\", \"D\" on what is the optimal next step.\n",
            "Output your new short function in backticks using the format below:\n",
            "```python\n",
            "def strategy(board):\n",
            "    return \"W\" # Example\n",
            "```\n",
            "All helper functions should be inside def strategy. Only output the short function `strategy`.<|end|><|start|>assistant<|channel|>analysis<|message|>We need simple heuristic: return random move or based on empty spaces. Provide function.<|end|><|start|>assistant<|channel|>final<|message|>```python\n",
            "def strategy(board):\n",
            "    # Count empty cells and choose move that reduces board density\n",
            "    empty_counts = {\n",
            "        \"W\": sum(row.count(0) for row in board[1:]),\n",
            "        \"S\": sum(row.count(0) for row in board[:-1]),\n",
            "        \"A\": sum(col.count(0) for col in zip(*board)[1:]),\n",
            "        \"D\": sum(col.count(0) for col in zip(*board)[:-1]),\n",
            "    }\n",
            "    # Prefer the direction with the most empty cells\n",
            "    return max(empty_counts, key=empty_counts.get)\n",
            "```<|return|>\n"
          ]
        }
      ],
      "source": [
        "text = tokenizer.apply_chat_template(\n",
        "    [{\"role\": \"user\", \"content\": prompt}],\n",
        "    tokenize = False,\n",
        "    add_generation_prompt = True,\n",
        "    reasoning_effort = \"low\",\n",
        ")\n",
        "\n",
        "from transformers import TextStreamer\n",
        "_ = model.generate(\n",
        "    **tokenizer(text, return_tensors = \"pt\").to(\"cuda\"),\n",
        "    temperature = 1.0,\n",
        "    max_new_tokens = 512,\n",
        "    streamer = TextStreamer(tokenizer, skip_prompt = False),\n",
        ")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "iknaWZNudTNq"
      },
      "source": [
        "# Reward functions\n",
        "\n",
        "We now design a `extract_function` function which simply extracts the function wrapped in 3 back ticks.\n",
        "\n",
        "And 3 reward functions:\n",
        "\n",
        "1. `function_works` which rewards the model if the strategy is a valid Python function.\n",
        "2. `no_cheating` which checks if the function imported other modules, and if it did, we penalize it.\n",
        "3. `strategy_succeeds` which checks if the game strategy actually succeeds in attaining 2048 after running the auto-generated strategy."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "8JJGXKdJ-Zl_",
        "outputId": "80fd8078-1621-4c64-a906-5204b444addd"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "def strategy(board):\n",
            "    return \"W\" # Example\n"
          ]
        }
      ],
      "source": [
        "def extract_function(text):\n",
        "    if text.count(\"```\") >= 2:\n",
        "        first = text.find(\"```\") + 3\n",
        "        second = text.find(\"```\", first)\n",
        "        fx = text[first : second].strip()\n",
        "        fx = fx.removeprefix(\"python\\n\")\n",
        "        fx = fx[fx.find(\"def\"):]\n",
        "        if fx.startswith(\"def strategy(board):\"): return fx\n",
        "    return None\n",
        "print(extract_function(prompt))"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "KLXEcf_HSJlI"
      },
      "source": [
        "Below is our `function_works` reward function which uses Python's `exec` but guarded by not allowing leakage of local and global variables. We can also use `check_python_modules` first to check if there are errors before even executing the function:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "h3-B0IIsS56S",
        "outputId": "f3e174fa-2fbf-400b-ec7d-87590be3ef68"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "(False,\n",
              " {'error': \"SyntaxError: expected '(' (<unknown>, line 1)\",\n",
              "  'stdlib': [],\n",
              "  'non_stdlib': [],\n",
              "  'relative_imports': 0})"
            ]
          },
          "execution_count": 23,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "ok, info = check_python_modules(\"def a\")\n",
        "ok, info"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "qgFNXORy-lpO"
      },
      "outputs": [],
      "source": [
        "def function_works(completions, **kwargs):\n",
        "    scores = []\n",
        "    for completion in completions:\n",
        "        score = 0\n",
        "        response = completion[0][\"content\"]\n",
        "        function = extract_function(response)\n",
        "        if function is not None:\n",
        "            ok, info = check_python_modules(function)\n",
        "        if function is None or \"error\" in info:\n",
        "            score = -2.0\n",
        "        else:\n",
        "            try:\n",
        "                new_strategy = create_locked_down_function(function)\n",
        "                score = 1.0\n",
        "            except:\n",
        "                score = -0.5\n",
        "        scores.append(score)\n",
        "    return scores"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "Gf69i2WT-m4K"
      },
      "source": [
        "`no_cheating` checks if the function cheated since it might have imported Numpy or other functions:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "cUfHzCVx-nGK"
      },
      "outputs": [],
      "source": [
        "def no_cheating(completions, **kwargs):\n",
        "    scores = []\n",
        "    for completion in completions:\n",
        "        score = 0\n",
        "        response = completion[0][\"content\"]\n",
        "        function = extract_function(response)\n",
        "        if function is not None:\n",
        "            ok, info = check_python_modules(function)\n",
        "            scores.append(1.0 if ok else -20.0) # Penalize heavily!\n",
        "        else:\n",
        "            scores.append(-1.0) # Failed creating function\n",
        "    return scores"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "slnqWG3FTror"
      },
      "source": [
        "Next `strategy_succeeds` checks if the strategy actually allows the game to terminate. Imagine if the strategy simply returned \"W\" which would fail after a time limit of 10 seconds.\n",
        "\n",
        "We also add a global `PRINTER` to print out the strategy and board state."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "sNi129lYTpZ2"
      },
      "outputs": [],
      "source": [
        "import numpy as np\n",
        "global PRINTER\n",
        "PRINTER = 0\n",
        "def strategy_succeeds(completions, **kwargs):\n",
        "    global PRINTER\n",
        "    scores = []\n",
        "    # Generate a random game board with seed\n",
        "    seed = np.random.randint(10000)\n",
        "    for completion in completions:\n",
        "        printed = False\n",
        "        score = 0\n",
        "        response = completion[0][\"content\"]\n",
        "        function = extract_function(response)\n",
        "        if PRINTER % 5 == 0:\n",
        "            printed = True\n",
        "            print(function)\n",
        "        PRINTER += 1\n",
        "        if function is not None:\n",
        "            ok, info = check_python_modules(function)\n",
        "        if function is None or \"error\" in info:\n",
        "            scores.append(0)\n",
        "            continue\n",
        "        try:\n",
        "            new_strategy = create_locked_down_function(function)\n",
        "        except:\n",
        "            scores.append(0)\n",
        "            continue\n",
        "        try:\n",
        "            game = GameBoard(size = 6, seed = seed, target = 2048, probability_fours = 0.10)\n",
        "            steps, game_state = execute_strategy(new_strategy, game)\n",
        "            print(f\"Steps = {steps} State = {game_state}\")\n",
        "            if printed is False:\n",
        "                print(function)\n",
        "            print(game.board().pretty())\n",
        "            if game_state == \"success\":\n",
        "                scores.append(20.0) # Success - massively reward!\n",
        "            else:\n",
        "                scores.append(2.0) # Failed but function works!\n",
        "        except TimeoutError as e:\n",
        "            print(\"Timeout\")\n",
        "            scores.append(-1.0) # Failed with timeout\n",
        "        except Exception as e:\n",
        "            print(f\"Exception = {str(e)}\")\n",
        "            scores.append(-3.0) # Failed\n",
        "    return scores"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "TCpSxtvSeAG_"
      },
      "source": [
        "We'll now create the dataset which includes a replica of our prompt. Remember to add a reasoning effort of low! You can choose high reasoning mode, but this'll only work on more memory GPUs like H100s."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "Ldf6SjLHVPRv",
        "outputId": "589f7523-9835-49b5-c477-4e1d8b0744ff"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "181\n"
          ]
        },
        {
          "data": {
            "text/plain": [
              "{'prompt': [{'content': 'Create a new short 2048 strategy using only native Python code.\\nYou are given a list of list of numbers for the current board state.\\nOutput one action for \"W\", \"A\", \"S\", \"D\" on what is the optimal next step.\\nOutput your new short function in backticks using the format below:\\n```python\\ndef strategy(board):\\n    return \"W\" # Example\\n```\\nAll helper functions should be inside def strategy. Only output the short function `strategy`.',\n",
              "   'role': 'user'}],\n",
              " 'answer': 0,\n",
              " 'reasoning_effort': 'low'}"
            ]
          },
          "execution_count": 27,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "from datasets import Dataset\n",
        "dataset = Dataset.from_list([{\"prompt\" : [{\"role\": \"user\", \"content\": prompt.strip()}], \"answer\" : 0, \"reasoning_effort\": \"low\"}]*1000)\n",
        "maximum_length = len(tokenizer.apply_chat_template([{\"role\": \"user\", \"content\": prompt.strip()}], add_generation_prompt = True))\n",
        "print(maximum_length)\n",
        "dataset[0]"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "9-IOMhVg-2AM"
      },
      "source": [
        "<a name=\"Train\"></a>\n",
        "### Train the model\n",
        "\n",
        "Now set up GRPO Trainer and all configurations! We also support GSPO, GAPO, Dr GRPO and more! Go the Unsloth [Reinforcement Learning Docs](https://docs.unsloth.ai/get-started/reinforcement-learning-rl-guide) for more options."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "ptqkXK2D4d6p",
        "outputId": "2061b833-5b98-4a2b-e7f5-4bc4652d8300"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Unsloth: We now expect `per_device_train_batch_size` to be a multiple of `num_generations`.\n",
            "We will change the batch size of 1 to the `num_generations` of 2\n"
          ]
        }
      ],
      "source": [
        "max_prompt_length = maximum_length + 1 # + 1 just in case!\n",
        "max_completion_length = max_seq_length - max_prompt_length\n",
        "\n",
        "from trl import GRPOConfig, GRPOTrainer\n",
        "training_args = GRPOConfig(\n",
        "    temperature = 1.0,\n",
        "    learning_rate = 5e-5,\n",
        "    weight_decay = 0.001,\n",
        "    warmup_ratio = 0.1,\n",
        "    lr_scheduler_type = \"linear\",\n",
        "    optim = \"adamw_8bit\",\n",
        "    logging_steps = 1,\n",
        "    per_device_train_batch_size = 1,\n",
        "    gradient_accumulation_steps = 1, # Increase to 4 for smoother training\n",
        "    num_generations = 2, # Decrease if out of memory\n",
        "    max_prompt_length = max_prompt_length,\n",
        "    max_completion_length = max_completion_length,\n",
        "    # num_train_epochs = 1, # Set to 1 for a full training run\n",
        "    max_steps = 1000,\n",
        "    save_steps = 100,\n",
        "    report_to = \"none\", # Can use Weights & Biases, TrackIO\n",
        "    output_dir = \"outputs\",\n",
        "\n",
        "    # For optional training + evaluation\n",
        "    # fp16_full_eval = True,\n",
        "    # per_device_eval_batch_size = 4,\n",
        "    # eval_accumulation_steps = 1,\n",
        "    # eval_strategy = \"steps\",\n",
        "    # eval_steps = 1,\n",
        ")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "r9Mv8UZO5hz-"
      },
      "source": [
        "And let's run the trainer! If you scroll up, you'll see a table of rewards. The goal is to see the `reward` column increase!\n",
        "\n",
        "You might have to wait 150 to 200 steps for any action. You'll probably get 0 reward for the first 100 steps. Please be patient!\n",
        "\n",
        "| Step | Training Loss | reward    | reward_std | completion_length | kl       |\n",
        "|------|---------------|-----------|------------|-------------------|----------|\n",
        "| 1    | 0.000000      | 0.125000  | 0.000000   | 200.000000        | 0.000000 |\n",
        "| 2    | 0.000000      | 0.072375  | 0.248112   | 200.000000        | 0.000000 |\n",
        "| 3    | 0.000000      | -0.079000 | 0.163776   | 182.500000        | 0.000005 |\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "vzOuSVCL_GA9",
        "outputId": "349f907c-cc67-4890-e131-397694679634"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Unsloth: Switching to float32 training since model cannot work with float16\n"
          ]
        }
      ],
      "source": [
        "# For optional training + evaluation\n",
        "# new_dataset = dataset.train_test_split(test_size = 0.01)\n",
        "\n",
        "trainer = GRPOTrainer(\n",
        "    model = model,\n",
        "    processing_class = tokenizer,\n",
        "    reward_funcs = [\n",
        "        function_works,\n",
        "        no_cheating,\n",
        "        strategy_succeeds,\n",
        "    ],\n",
        "    args = training_args,\n",
        "    train_dataset = dataset,\n",
        "\n",
        "    # For optional training + evaluation\n",
        "    # train_dataset = new_dataset[\"train\"],\n",
        "    # eval_dataset = new_dataset[\"test\"],\n",
        ")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "fQhtuwP4cf34"
      },
      "source": [
        "And let's train the model!\n",
        "\n",
        "**NOTE** A T4 free GPU might take 5 minutes for one generation sadly since it's an old GPU - A100 or H100 will be much faster!"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 30,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        },
        "id": "VGRxPdSCcfC3",
        "outputId": "f8bb720c-6d69-4f43-d9d1-a404842d2dff"
      },
      "outputs": [
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "The tokenizer has new PAD/BOS/EOS tokens that differ from the model config and generation config. The model config and generation config were aligned accordingly, being updated with the tokenizer's values. Updated tokens: {'bos_token_id': 199998, 'pad_token_id': 200017}.\n",
            "==((====))==  Unsloth - 2x faster free finetuning | Num GPUs used = 2\n",
            "   \\\\   /|    Num examples = 1,000 | Num Epochs = 1 | Total steps = 1,000\n",
            "O^O/ \\_/ \\    Batch size per device = 2 | Gradient accumulation steps = 1\n",
            "\\        /    Data Parallel GPUs = 1 | Total batch size (2 x 1 x 1) = 2\n",
            " \"-____-\"     Trainable parameters = 1,990,656 of 20,916,747,840 (0.01% trained)\n",
            "`generation_config` default values have been modified to match model-specific defaults: {'max_length': 131072}. If this is not desired, please set these values explicitly.\n"
          ]
        },
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "None\n",
            "Steps = 1 State = failed\n",
            "def strategy(board):\n",
            "    # simple heuristic: prefer right or down, then left, then up\n",
            "    for move in \"R D L U\".split():\n",
            "        pass\n",
            "┌───┬───┬───┬───┬───┬───┐\n",
            "│\u001b[38;5;45m  2\u001b[0m│\u001b[38;5;45m  2\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "└───┴───┴───┴───┴───┴───┘\n"
          ]
        },
        {
          "data": {
            "text/html": [
              "\n",
              "    <div>\n",
              "      \n",
              "      <progress value='86' max='1000' style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
              "      [  86/1000 8:06:01 < 88:08:29, 0.00 it/s, Epoch 0.09/1]\n",
              "    </div>\n",
              "    <table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              " <tr style=\"text-align: left;\">\n",
              "      <th>Step</th>\n",
              "      <th>Training Loss</th>\n",
              "      <th>reward</th>\n",
              "      <th>reward_std</th>\n",
              "      <th>completions / mean_length</th>\n",
              "      <th>completions / min_length</th>\n",
              "      <th>completions / max_length</th>\n",
              "      <th>completions / clipped_ratio</th>\n",
              "      <th>completions / mean_terminated_length</th>\n",
              "      <th>completions / min_terminated_length</th>\n",
              "      <th>completions / max_terminated_length</th>\n",
              "      <th>kl</th>\n",
              "      <th>rewards / function_works / mean</th>\n",
              "      <th>rewards / function_works / std</th>\n",
              "      <th>rewards / no_cheating / mean</th>\n",
              "      <th>rewards / no_cheating / std</th>\n",
              "      <th>rewards / strategy_succeeds / mean</th>\n",
              "      <th>rewards / strategy_succeeds / std</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <td>1</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>4.949748</td>\n",
              "      <td>329.000000</td>\n",
              "      <td>72.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>72.000000</td>\n",
              "      <td>72.000000</td>\n",
              "      <td>72.000000</td>\n",
              "      <td>0.002197</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>1.414214</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>2</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>4.949748</td>\n",
              "      <td>550.500000</td>\n",
              "      <td>515.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>515.000000</td>\n",
              "      <td>515.000000</td>\n",
              "      <td>515.000000</td>\n",
              "      <td>0.000298</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>1.414214</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>3</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>538.000000</td>\n",
              "      <td>490.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>490.000000</td>\n",
              "      <td>490.000000</td>\n",
              "      <td>490.000000</td>\n",
              "      <td>0.000276</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-1.500000</td>\n",
              "      <td>2.121320</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>4</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>2.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>325.000000</td>\n",
              "      <td>120.000000</td>\n",
              "      <td>530.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>325.000000</td>\n",
              "      <td>120.000000</td>\n",
              "      <td>530.000000</td>\n",
              "      <td>0.000568</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>5</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>437.000000</td>\n",
              "      <td>288.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>288.000000</td>\n",
              "      <td>288.000000</td>\n",
              "      <td>288.000000</td>\n",
              "      <td>0.001381</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-1.500000</td>\n",
              "      <td>2.121320</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>6</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>308.500000</td>\n",
              "      <td>301.000000</td>\n",
              "      <td>316.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>308.500000</td>\n",
              "      <td>301.000000</td>\n",
              "      <td>316.000000</td>\n",
              "      <td>0.000826</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-3.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>7</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>519.000000</td>\n",
              "      <td>452.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>452.000000</td>\n",
              "      <td>452.000000</td>\n",
              "      <td>452.000000</td>\n",
              "      <td>0.000223</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>8</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>333.500000</td>\n",
              "      <td>81.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>81.000000</td>\n",
              "      <td>81.000000</td>\n",
              "      <td>81.000000</td>\n",
              "      <td>0.001181</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>9</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>568.500000</td>\n",
              "      <td>551.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>551.000000</td>\n",
              "      <td>551.000000</td>\n",
              "      <td>551.000000</td>\n",
              "      <td>0.000281</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>10</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-3.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000153</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>11</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>2.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>330.000000</td>\n",
              "      <td>264.000000</td>\n",
              "      <td>396.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>330.000000</td>\n",
              "      <td>264.000000</td>\n",
              "      <td>396.000000</td>\n",
              "      <td>0.004015</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>12</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>374.500000</td>\n",
              "      <td>360.000000</td>\n",
              "      <td>389.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>374.500000</td>\n",
              "      <td>360.000000</td>\n",
              "      <td>389.000000</td>\n",
              "      <td>0.000245</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>13</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>520.500000</td>\n",
              "      <td>455.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>455.000000</td>\n",
              "      <td>455.000000</td>\n",
              "      <td>455.000000</td>\n",
              "      <td>0.000915</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>14</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>406.500000</td>\n",
              "      <td>227.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>227.000000</td>\n",
              "      <td>227.000000</td>\n",
              "      <td>227.000000</td>\n",
              "      <td>0.007664</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>15</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>348.500000</td>\n",
              "      <td>302.000000</td>\n",
              "      <td>395.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>348.500000</td>\n",
              "      <td>302.000000</td>\n",
              "      <td>395.000000</td>\n",
              "      <td>0.002411</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>16</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>408.000000</td>\n",
              "      <td>379.000000</td>\n",
              "      <td>437.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>408.000000</td>\n",
              "      <td>379.000000</td>\n",
              "      <td>437.000000</td>\n",
              "      <td>0.002496</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>17</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-12.500000</td>\n",
              "      <td>13.435029</td>\n",
              "      <td>493.000000</td>\n",
              "      <td>400.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>400.000000</td>\n",
              "      <td>400.000000</td>\n",
              "      <td>400.000000</td>\n",
              "      <td>0.009901</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-10.500000</td>\n",
              "      <td>13.435029</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>18</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>413.000000</td>\n",
              "      <td>260.000000</td>\n",
              "      <td>566.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>413.000000</td>\n",
              "      <td>260.000000</td>\n",
              "      <td>566.000000</td>\n",
              "      <td>0.021275</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>19</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>487.500000</td>\n",
              "      <td>389.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>389.000000</td>\n",
              "      <td>389.000000</td>\n",
              "      <td>389.000000</td>\n",
              "      <td>0.019204</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>20</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.001022</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-1.500000</td>\n",
              "      <td>2.121320</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>21</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>397.500000</td>\n",
              "      <td>276.000000</td>\n",
              "      <td>519.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>397.500000</td>\n",
              "      <td>276.000000</td>\n",
              "      <td>519.000000</td>\n",
              "      <td>0.027686</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>22</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>499.500000</td>\n",
              "      <td>486.000000</td>\n",
              "      <td>513.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>499.500000</td>\n",
              "      <td>486.000000</td>\n",
              "      <td>513.000000</td>\n",
              "      <td>0.007218</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>23</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.250000</td>\n",
              "      <td>2.474874</td>\n",
              "      <td>575.500000</td>\n",
              "      <td>565.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>565.000000</td>\n",
              "      <td>565.000000</td>\n",
              "      <td>565.000000</td>\n",
              "      <td>0.005928</td>\n",
              "      <td>-1.250000</td>\n",
              "      <td>1.060660</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>24</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>563.500000</td>\n",
              "      <td>541.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>541.000000</td>\n",
              "      <td>541.000000</td>\n",
              "      <td>541.000000</td>\n",
              "      <td>0.008769</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-1.500000</td>\n",
              "      <td>2.121320</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>25</td>\n",
              "      <td>0.000100</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>444.500000</td>\n",
              "      <td>303.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>303.000000</td>\n",
              "      <td>303.000000</td>\n",
              "      <td>303.000000</td>\n",
              "      <td>0.084963</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>26</td>\n",
              "      <td>0.000100</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>419.000000</td>\n",
              "      <td>252.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>252.000000</td>\n",
              "      <td>252.000000</td>\n",
              "      <td>252.000000</td>\n",
              "      <td>0.114125</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-1.500000</td>\n",
              "      <td>2.121320</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>27</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>339.500000</td>\n",
              "      <td>321.000000</td>\n",
              "      <td>358.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>339.500000</td>\n",
              "      <td>321.000000</td>\n",
              "      <td>358.000000</td>\n",
              "      <td>0.033457</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>28</td>\n",
              "      <td>0.000100</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>372.500000</td>\n",
              "      <td>311.000000</td>\n",
              "      <td>434.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>372.500000</td>\n",
              "      <td>311.000000</td>\n",
              "      <td>434.000000</td>\n",
              "      <td>0.081829</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>29</td>\n",
              "      <td>0.000100</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>387.500000</td>\n",
              "      <td>336.000000</td>\n",
              "      <td>439.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>387.500000</td>\n",
              "      <td>336.000000</td>\n",
              "      <td>439.000000</td>\n",
              "      <td>0.100017</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>30</td>\n",
              "      <td>0.000100</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>463.000000</td>\n",
              "      <td>410.000000</td>\n",
              "      <td>516.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>463.000000</td>\n",
              "      <td>410.000000</td>\n",
              "      <td>516.000000</td>\n",
              "      <td>0.095180</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>31</td>\n",
              "      <td>0.000300</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>445.500000</td>\n",
              "      <td>305.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>305.000000</td>\n",
              "      <td>305.000000</td>\n",
              "      <td>305.000000</td>\n",
              "      <td>0.321803</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>32</td>\n",
              "      <td>0.000300</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>425.000000</td>\n",
              "      <td>310.000000</td>\n",
              "      <td>540.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>425.000000</td>\n",
              "      <td>310.000000</td>\n",
              "      <td>540.000000</td>\n",
              "      <td>0.335011</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>33</td>\n",
              "      <td>0.000400</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>458.500000</td>\n",
              "      <td>331.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>331.000000</td>\n",
              "      <td>331.000000</td>\n",
              "      <td>331.000000</td>\n",
              "      <td>0.362238</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>34</td>\n",
              "      <td>0.000500</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>347.500000</td>\n",
              "      <td>207.000000</td>\n",
              "      <td>488.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>347.500000</td>\n",
              "      <td>207.000000</td>\n",
              "      <td>488.000000</td>\n",
              "      <td>0.518291</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>35</td>\n",
              "      <td>0.000400</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>471.000000</td>\n",
              "      <td>356.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>356.000000</td>\n",
              "      <td>356.000000</td>\n",
              "      <td>356.000000</td>\n",
              "      <td>0.383606</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-1.500000</td>\n",
              "      <td>2.121320</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>36</td>\n",
              "      <td>0.000700</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>393.000000</td>\n",
              "      <td>200.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>200.000000</td>\n",
              "      <td>200.000000</td>\n",
              "      <td>200.000000</td>\n",
              "      <td>0.674902</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>37</td>\n",
              "      <td>0.000700</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>344.500000</td>\n",
              "      <td>198.000000</td>\n",
              "      <td>491.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>344.500000</td>\n",
              "      <td>198.000000</td>\n",
              "      <td>491.000000</td>\n",
              "      <td>0.689294</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>38</td>\n",
              "      <td>0.000600</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>473.500000</td>\n",
              "      <td>361.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>361.000000</td>\n",
              "      <td>361.000000</td>\n",
              "      <td>361.000000</td>\n",
              "      <td>0.607979</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>39</td>\n",
              "      <td>0.000100</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>380.000000</td>\n",
              "      <td>361.000000</td>\n",
              "      <td>399.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>380.000000</td>\n",
              "      <td>361.000000</td>\n",
              "      <td>399.000000</td>\n",
              "      <td>0.142165</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>40</td>\n",
              "      <td>0.000300</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>386.500000</td>\n",
              "      <td>352.000000</td>\n",
              "      <td>421.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>386.500000</td>\n",
              "      <td>352.000000</td>\n",
              "      <td>421.000000</td>\n",
              "      <td>0.293521</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>41</td>\n",
              "      <td>0.000500</td>\n",
              "      <td>-10.500000</td>\n",
              "      <td>16.263456</td>\n",
              "      <td>107.500000</td>\n",
              "      <td>89.000000</td>\n",
              "      <td>126.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>107.500000</td>\n",
              "      <td>89.000000</td>\n",
              "      <td>126.000000</td>\n",
              "      <td>0.465591</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>-9.500000</td>\n",
              "      <td>14.849242</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>42</td>\n",
              "      <td>0.000300</td>\n",
              "      <td>-0.250000</td>\n",
              "      <td>1.060660</td>\n",
              "      <td>410.000000</td>\n",
              "      <td>373.000000</td>\n",
              "      <td>447.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>410.000000</td>\n",
              "      <td>373.000000</td>\n",
              "      <td>447.000000</td>\n",
              "      <td>0.314028</td>\n",
              "      <td>0.250000</td>\n",
              "      <td>1.060660</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.500000</td>\n",
              "      <td>2.121320</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>43</td>\n",
              "      <td>0.000800</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>473.000000</td>\n",
              "      <td>360.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>360.000000</td>\n",
              "      <td>360.000000</td>\n",
              "      <td>360.000000</td>\n",
              "      <td>0.753577</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>44</td>\n",
              "      <td>0.000400</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>528.500000</td>\n",
              "      <td>471.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>471.000000</td>\n",
              "      <td>471.000000</td>\n",
              "      <td>471.000000</td>\n",
              "      <td>0.370155</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>45</td>\n",
              "      <td>0.000600</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>360.000000</td>\n",
              "      <td>293.000000</td>\n",
              "      <td>427.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>360.000000</td>\n",
              "      <td>293.000000</td>\n",
              "      <td>427.000000</td>\n",
              "      <td>0.609444</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>46</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>581.500000</td>\n",
              "      <td>577.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>577.000000</td>\n",
              "      <td>577.000000</td>\n",
              "      <td>577.000000</td>\n",
              "      <td>0.021817</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>47</td>\n",
              "      <td>0.000900</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>466.500000</td>\n",
              "      <td>347.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>347.000000</td>\n",
              "      <td>347.000000</td>\n",
              "      <td>347.000000</td>\n",
              "      <td>0.863071</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>48</td>\n",
              "      <td>0.000700</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>495.000000</td>\n",
              "      <td>404.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>404.000000</td>\n",
              "      <td>404.000000</td>\n",
              "      <td>404.000000</td>\n",
              "      <td>0.727124</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>49</td>\n",
              "      <td>0.000200</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>558.500000</td>\n",
              "      <td>531.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>531.000000</td>\n",
              "      <td>531.000000</td>\n",
              "      <td>531.000000</td>\n",
              "      <td>0.173142</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-1.500000</td>\n",
              "      <td>2.121320</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>50</td>\n",
              "      <td>0.000100</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>477.000000</td>\n",
              "      <td>465.000000</td>\n",
              "      <td>489.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>477.000000</td>\n",
              "      <td>465.000000</td>\n",
              "      <td>489.000000</td>\n",
              "      <td>0.089374</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>51</td>\n",
              "      <td>0.001400</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>367.500000</td>\n",
              "      <td>149.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>149.000000</td>\n",
              "      <td>149.000000</td>\n",
              "      <td>149.000000</td>\n",
              "      <td>1.374907</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>52</td>\n",
              "      <td>0.000900</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>458.500000</td>\n",
              "      <td>331.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>331.000000</td>\n",
              "      <td>331.000000</td>\n",
              "      <td>331.000000</td>\n",
              "      <td>0.929248</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-1.500000</td>\n",
              "      <td>2.121320</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>53</td>\n",
              "      <td>0.000900</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>475.000000</td>\n",
              "      <td>364.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>364.000000</td>\n",
              "      <td>364.000000</td>\n",
              "      <td>364.000000</td>\n",
              "      <td>0.887930</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>54</td>\n",
              "      <td>0.000100</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>439.000000</td>\n",
              "      <td>424.000000</td>\n",
              "      <td>454.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>439.000000</td>\n",
              "      <td>424.000000</td>\n",
              "      <td>454.000000</td>\n",
              "      <td>0.126352</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>55</td>\n",
              "      <td>0.000400</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>323.500000</td>\n",
              "      <td>293.000000</td>\n",
              "      <td>354.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>323.500000</td>\n",
              "      <td>293.000000</td>\n",
              "      <td>354.000000</td>\n",
              "      <td>0.367167</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>56</td>\n",
              "      <td>0.000400</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>543.000000</td>\n",
              "      <td>500.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>543.000000</td>\n",
              "      <td>500.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.375893</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>57</td>\n",
              "      <td>0.000700</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>382.000000</td>\n",
              "      <td>317.000000</td>\n",
              "      <td>447.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>382.000000</td>\n",
              "      <td>317.000000</td>\n",
              "      <td>447.000000</td>\n",
              "      <td>0.687571</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>58</td>\n",
              "      <td>0.000600</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>506.000000</td>\n",
              "      <td>426.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>426.000000</td>\n",
              "      <td>426.000000</td>\n",
              "      <td>426.000000</td>\n",
              "      <td>0.648271</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>59</td>\n",
              "      <td>0.001100</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>260.500000</td>\n",
              "      <td>187.000000</td>\n",
              "      <td>334.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>260.500000</td>\n",
              "      <td>187.000000</td>\n",
              "      <td>334.000000</td>\n",
              "      <td>1.084255</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>60</td>\n",
              "      <td>0.000200</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>523.500000</td>\n",
              "      <td>495.000000</td>\n",
              "      <td>552.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>523.500000</td>\n",
              "      <td>495.000000</td>\n",
              "      <td>552.000000</td>\n",
              "      <td>0.198019</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>61</td>\n",
              "      <td>0.001000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>471.500000</td>\n",
              "      <td>357.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>357.000000</td>\n",
              "      <td>357.000000</td>\n",
              "      <td>357.000000</td>\n",
              "      <td>0.987108</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>62</td>\n",
              "      <td>0.000400</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>532.000000</td>\n",
              "      <td>478.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>478.000000</td>\n",
              "      <td>478.000000</td>\n",
              "      <td>478.000000</td>\n",
              "      <td>0.428900</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>63</td>\n",
              "      <td>0.000100</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>411.000000</td>\n",
              "      <td>400.000000</td>\n",
              "      <td>422.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>411.000000</td>\n",
              "      <td>400.000000</td>\n",
              "      <td>422.000000</td>\n",
              "      <td>0.107686</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-3.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>64</td>\n",
              "      <td>0.001000</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>470.500000</td>\n",
              "      <td>355.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>355.000000</td>\n",
              "      <td>355.000000</td>\n",
              "      <td>355.000000</td>\n",
              "      <td>0.967091</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-1.500000</td>\n",
              "      <td>2.121320</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>65</td>\n",
              "      <td>0.000300</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>553.000000</td>\n",
              "      <td>520.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>520.000000</td>\n",
              "      <td>520.000000</td>\n",
              "      <td>520.000000</td>\n",
              "      <td>0.262037</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-1.500000</td>\n",
              "      <td>2.121320</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>66</td>\n",
              "      <td>0.000400</td>\n",
              "      <td>2.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>471.500000</td>\n",
              "      <td>423.000000</td>\n",
              "      <td>520.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>471.500000</td>\n",
              "      <td>423.000000</td>\n",
              "      <td>520.000000</td>\n",
              "      <td>0.414690</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>67</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>580.500000</td>\n",
              "      <td>575.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>575.000000</td>\n",
              "      <td>575.000000</td>\n",
              "      <td>575.000000</td>\n",
              "      <td>0.035250</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>68</td>\n",
              "      <td>0.001200</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>435.000000</td>\n",
              "      <td>284.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>284.000000</td>\n",
              "      <td>284.000000</td>\n",
              "      <td>284.000000</td>\n",
              "      <td>1.168353</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>69</td>\n",
              "      <td>0.000800</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>492.000000</td>\n",
              "      <td>398.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>398.000000</td>\n",
              "      <td>398.000000</td>\n",
              "      <td>398.000000</td>\n",
              "      <td>0.789415</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>70</td>\n",
              "      <td>0.000700</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>291.500000</td>\n",
              "      <td>240.000000</td>\n",
              "      <td>343.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>291.500000</td>\n",
              "      <td>240.000000</td>\n",
              "      <td>343.000000</td>\n",
              "      <td>0.723002</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>71</td>\n",
              "      <td>0.001000</td>\n",
              "      <td>-10.500000</td>\n",
              "      <td>16.263456</td>\n",
              "      <td>407.000000</td>\n",
              "      <td>301.000000</td>\n",
              "      <td>513.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>407.000000</td>\n",
              "      <td>301.000000</td>\n",
              "      <td>513.000000</td>\n",
              "      <td>0.958203</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>-9.500000</td>\n",
              "      <td>14.849242</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>72</td>\n",
              "      <td>0.000900</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>362.500000</td>\n",
              "      <td>279.000000</td>\n",
              "      <td>446.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>362.500000</td>\n",
              "      <td>279.000000</td>\n",
              "      <td>446.000000</td>\n",
              "      <td>0.902191</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>73</td>\n",
              "      <td>0.000100</td>\n",
              "      <td>0.750000</td>\n",
              "      <td>0.353553</td>\n",
              "      <td>479.000000</td>\n",
              "      <td>466.000000</td>\n",
              "      <td>492.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>479.000000</td>\n",
              "      <td>466.000000</td>\n",
              "      <td>492.000000</td>\n",
              "      <td>0.102604</td>\n",
              "      <td>0.250000</td>\n",
              "      <td>1.060660</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>74</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>579.000000</td>\n",
              "      <td>572.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>572.000000</td>\n",
              "      <td>572.000000</td>\n",
              "      <td>572.000000</td>\n",
              "      <td>0.049443</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-1.500000</td>\n",
              "      <td>2.121320</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>75</td>\n",
              "      <td>0.000200</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>530.500000</td>\n",
              "      <td>507.000000</td>\n",
              "      <td>554.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>530.500000</td>\n",
              "      <td>507.000000</td>\n",
              "      <td>554.000000</td>\n",
              "      <td>0.173276</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>76</td>\n",
              "      <td>0.000500</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>401.000000</td>\n",
              "      <td>353.000000</td>\n",
              "      <td>449.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>401.000000</td>\n",
              "      <td>353.000000</td>\n",
              "      <td>449.000000</td>\n",
              "      <td>0.522857</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>77</td>\n",
              "      <td>0.000300</td>\n",
              "      <td>0.750000</td>\n",
              "      <td>0.353553</td>\n",
              "      <td>512.500000</td>\n",
              "      <td>473.000000</td>\n",
              "      <td>552.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>512.500000</td>\n",
              "      <td>473.000000</td>\n",
              "      <td>552.000000</td>\n",
              "      <td>0.271977</td>\n",
              "      <td>0.250000</td>\n",
              "      <td>1.060660</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>78</td>\n",
              "      <td>0.000200</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>432.500000</td>\n",
              "      <td>411.000000</td>\n",
              "      <td>454.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>432.500000</td>\n",
              "      <td>411.000000</td>\n",
              "      <td>454.000000</td>\n",
              "      <td>0.181327</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>79</td>\n",
              "      <td>0.000200</td>\n",
              "      <td>10.500000</td>\n",
              "      <td>16.263456</td>\n",
              "      <td>475.000000</td>\n",
              "      <td>452.000000</td>\n",
              "      <td>498.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>475.000000</td>\n",
              "      <td>452.000000</td>\n",
              "      <td>498.000000</td>\n",
              "      <td>0.200004</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>8.500000</td>\n",
              "      <td>16.263456</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>80</td>\n",
              "      <td>0.000600</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>341.000000</td>\n",
              "      <td>296.000000</td>\n",
              "      <td>386.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>341.000000</td>\n",
              "      <td>296.000000</td>\n",
              "      <td>386.000000</td>\n",
              "      <td>0.606937</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-2.000000</td>\n",
              "      <td>1.414214</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>81</td>\n",
              "      <td>0.000200</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>456.500000</td>\n",
              "      <td>428.000000</td>\n",
              "      <td>485.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>456.500000</td>\n",
              "      <td>428.000000</td>\n",
              "      <td>485.000000</td>\n",
              "      <td>0.235978</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>82</td>\n",
              "      <td>0.000800</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>407.000000</td>\n",
              "      <td>326.000000</td>\n",
              "      <td>488.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>407.000000</td>\n",
              "      <td>326.000000</td>\n",
              "      <td>488.000000</td>\n",
              "      <td>0.825952</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>83</td>\n",
              "      <td>0.000200</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>557.500000</td>\n",
              "      <td>529.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>529.000000</td>\n",
              "      <td>529.000000</td>\n",
              "      <td>529.000000</td>\n",
              "      <td>0.239547</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>84</td>\n",
              "      <td>0.001600</td>\n",
              "      <td>-1.000000</td>\n",
              "      <td>2.828427</td>\n",
              "      <td>368.500000</td>\n",
              "      <td>151.000000</td>\n",
              "      <td>586.000000</td>\n",
              "      <td>0.500000</td>\n",
              "      <td>151.000000</td>\n",
              "      <td>151.000000</td>\n",
              "      <td>151.000000</td>\n",
              "      <td>1.608883</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>2.121320</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.414214</td>\n",
              "      <td>-0.500000</td>\n",
              "      <td>0.707107</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table><p>"
            ],
            "text/plain": [
              "<IPython.core.display.HTML object>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Steps = 1 State = failed\n",
            "def strategy(board):\n",
            "    # Helper: simulate a move, return new board and score\n",
            "    def simulate(board, dir):\n",
            "        n = len(board)\n",
            "        new = [[0]*n for _ in range(n)]\n",
            "        score = 0\n",
            "        for i in range(n):\n",
            "            # extract line\n",
            "            if dir == 'A':\n",
            "                line = [board[i][j] for j in range(n)]\n",
            "                rev = False\n",
            "            elif dir == 'D':\n",
            "                line = [board[i][j] for j in range(n-1, -1, -1)]\n",
            "                rev = True\n",
            "            elif dir == 'W':\n",
            "                line = [board[j][i] for j in range(n)]\n",
            "                rev = False\n",
            "            else:  # 'S'\n",
            "                line = [board[j][i] for j in range(n-1, -1, -1)]\n",
            "                rev = True\n",
            "            # compress and merge\n",
            "            new_line = [x for x in line if x != 0]\n",
            "            merged = []\n",
            "            j = 0\n",
            "            while j < len(new_line):\n",
            "                if j + 1 < len(new_line) and new_line[j] == new_line[j+1]:\n",
            "                    merged.append(new_line[j]*2)\n",
            "                    score += new_line[j]*2\n",
            "                    j += 2\n",
            "                else:\n",
            "                    merged.append(new_line[j])\n",
            "                    j += 1\n",
            "            # fill with zeros\n",
            "            merged += [0]*(n-len(merged))\n",
            "            # place back\n",
            "            if rev:\n",
            "                merged = merged[::-1]\n",
            "            if dir in ('A','D'):\n",
            "                for j in range(n):\n",
            "                    new[i][j] = merged[j]\n",
            "            else:\n",
            "                for j in range(n):\n",
            "                    new[j][i] = merged[j]\n",
            "        return new, score\n",
            "\n",
            "    best, best_dir = 0, None\n",
            "    for dir in ('W','A','S','D'):\n",
            "        _, score = simulate(board, dir)\n",
            "        if score > best:\n",
            "            best, best_dir = score, dir\n",
            "    return best_dir  # returns one of 'W','A','S','D'\n",
            "┌───┬───┬───┬───┬───┬───┐\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;51m  4\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;45m  2\u001b[0m│\n",
            "├───┼───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "├───┼───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\u001b[38;5;239m  .\u001b[0m│\n",
            "└───┴───┴───┴───┴───┴───┘\n",
            "Unsloth: Will smartly offload gradients to save VRAM!\n",
            "def strategy(board):\n",
            "    # helpers\n",
            "    def move(b, d):\n",
            "        n = len(b)\n",
            "        def compress(row):\n",
            "            new = [x for x in row if x!=0]\n",
            "            for i in range(len(new)-1):\n",
            "                if new[i]==new[i+1]:\n",
            "                    new[i]*=2; new[i+1]=0\n",
            "            return [x for x in new if x!=0]+[0]*(n-len(new))\n",
            "        res=[[0]*n for _ in range(n)]\n",
            "        if d==\"W\":\n",
            "            for j in range(n):\n",
            "                col=[b[i][j] for i in range(n)]\n",
            "                col=compress(col)\n",
            "                for i in range(n):\n",
            "                    res[i][j]=col[i]\n",
            "        elif d==\"S\":\n",
            "            for j in range(n):\n",
            "                col=[b[i][j] for i in range(n)][::-1]\n",
            "                col=compress(col)\n",
            "                col=col[::-1]\n",
            "                for i in range(n):\n",
            "                    res[i][j]=col[i]\n",
            "        elif d==\"A\":\n",
            "            for i in range(n):\n",
            "                row=compress(b[i])\n",
            "                res[i]=row\n",
            "        elif d==\"D\":\n",
            "            for i in range(n):\n",
            "                row=compress(b[i][::-1])\n",
            "                row=row[::-1]\n",
            "                res[i]=row\n",
            "        return res\n",
            "\n",
            "    def score(b):\n",
            "        return sum(sum(row) for row in b)\n",
            "\n",
            "    moves=\"WASD\"\n",
            "    best=None; best_val=-1\n",
            "    for m in moves:\n",
            "        nb=move(board, m)\n",
            "        val=score(nb)\n",
            "        if val>best_val and any(nb[i][j]!=board[i][j] for i in range(len(nb)) for j in range(len(nb[0]))):\n",
            "            best_val=val; best=m\n",
            "    return best if best else \"W\"\n",
            "Exception = list index out of range\n",
            "Timeout\n",
            "Steps = 475 State = failed\n",
            "def strategy(board):\n",
            "    def move_possible(board, direction):\n",
            "        rows, cols = len(board), len(board[0])\n",
            "        if direction == 'W':\n",
            "            for j in range(cols):\n",
            "                for i in range(1, rows):\n",
            "                    if board[i][j] != 0:\n",
            "                        for k in range(i-1, -1, -1):\n",
            "                            if board[k][j] == 0 or board[k][j] == board[i][j]:\n",
            "                                return True\n",
            "                            if board[k][j] != 0:\n",
            "                                break\n",
            "        elif direction == 'S':\n",
            "            for j in range(cols):\n",
            "                for i in range(rows-2, -1, -1):\n",
            "                    if board[i][j] != 0:\n",
            "                        for k in range(i+1, rows):\n",
            "                            if board[k][j] == 0 or board[k][j] == board[i][j]:\n",
            "                                return True\n",
            "                            if board[k][j] != 0:\n",
            "                                break\n",
            "        elif direction == 'A':\n",
            "            for i in range(rows):\n",
            "                for j in range(1, cols):\n",
            "                    if board[i][j] != 0:\n",
            "                        for k in range(j-1, -1, -1):\n",
            "                            if board[i][k] == 0 or board[i][k] == board[i][j]:\n",
            "                                return True\n",
            "                            if board[i][k] != 0:\n",
            "                                break\n",
            "        elif direction == 'D':\n",
            "            for i in range(rows):\n",
            "                for j in range(cols-2, -1, -1):\n",
            "                    if board[i][j] != 0:\n",
            "                        for k in range(j+1, cols):\n",
            "                            if board[i][k] == 0 or board[i][k] == board[i][j]:\n",
            "                                return True\n",
            "                            if board[i][k] != 0:\n",
            "                                break\n",
            "        return False\n",
            "\n",
            "    # Prefer moves that allow a merge as they increase score\n",
            "    for d in ('W', 'S', 'A', 'D'):\n",
            "        if move_possible(board, d):\n",
            "            return d\n",
            "    # If no merges are possible, pick any direction that moves tiles\n",
            "    for d in ('W', 'S', 'A', 'D'):\n",
            "        if any(board[i][j] != 0 for i in range(len(board)) for j in range(len(board[0]))):\n",
            "            return d\n",
            "    return 'W'\n",
            "┌───┬───┬───┬───┬───┬───┐\n",
            "│\u001b[38;5;45m  2\u001b[0m│\u001b[38;5;47m 16\u001b[0m│\u001b[38;5;51m  4\u001b[0m│\u001b[38;5;45m  2\u001b[0m│\u001b[38;5;49m  8\u001b[0m│\u001b[38;5;51m  4\u001b[0m│\n",
            "├───┼───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;49m  8\u001b[0m│\u001b[38;5;45m  2\u001b[0m│\u001b[38;5;46m 32\u001b[0m│\u001b[38;5;49m  8\u001b[0m│\u001b[38;5;154m128\u001b[0m│\u001b[38;5;49m  8\u001b[0m│\n",
            "├───┼───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;46m 32\u001b[0m│\u001b[38;5;118m 64\u001b[0m│\u001b[38;5;226m256\u001b[0m│\u001b[38;5;45m  2\u001b[0m│\u001b[38;5;118m 64\u001b[0m│\u001b[38;5;46m 32\u001b[0m│\n",
            "├───┼───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;154m128\u001b[0m│\u001b[38;5;49m  8\u001b[0m│\u001b[38;5;47m 16\u001b[0m│\u001b[38;5;118m 64\u001b[0m│\u001b[38;5;46m 32\u001b[0m│\u001b[38;5;49m  8\u001b[0m│\n",
            "├───┼───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;51m  4\u001b[0m│\u001b[38;5;45m  2\u001b[0m│\u001b[38;5;51m  4\u001b[0m│\u001b[38;5;47m 16\u001b[0m│\u001b[38;5;49m  8\u001b[0m│\u001b[38;5;51m  4\u001b[0m│\n",
            "├───┼───┼───┼───┼───┼───┤\n",
            "│\u001b[38;5;118m 64\u001b[0m│\u001b[38;5;51m  4\u001b[0m│\u001b[38;5;45m  2\u001b[0m│\u001b[38;5;49m  8\u001b[0m│\u001b[38;5;51m  4\u001b[0m│\u001b[38;5;45m  2\u001b[0m│\n",
            "└───┴───┴───┴───┴───┴───┘\n",
            "Exception = '>' not supported between instances of 'tuple' and 'float'\n",
            "def strategy(board):\n",
            "    import random, copy\n",
            "\n",
            "    def rotate(b):\n",
            "        return [[b[3-j][i] for j in range(4)] for i in range(4)]\n",
            "\n",
            "    def compress(b):\n",
            "        new = []\n",
            "        for row in b:\n",
            "            new_row = [x for x in row if x != 0]\n",
            "            new_row += [0]*(4-len(new_row))\n",
            "            new.append(new_row)\n",
            "        return new\n",
            "\n",
            "    def merge(b):\n",
            "        for row in b:\n",
            "            for i in range(3):\n",
            "                if row[i]==row[i+1] and row[i]!=0:\n",
            "                    row[i]*=2\n",
            "                    row[i+1]=0\n",
            "\n",
            "    def move(b, dir):\n",
            "        if dir==\"W\":\n",
            "            return merge(rotate(compress(rotate(b))))\n",
            "        if dir==\"S\":\n",
            "            return rotate(merge(compress(rotate(b))))\n",
            "        if dir==\"A\":\n",
            "            return merge(compress(b))\n",
            "        if dir==\"D\":\n",
            "            return rotate(merge(compress(rotate(b))))  # actually reverse\n",
            "\n",
            "    best_score=0\n",
            "    best_move=None\n",
            "    for move_dir in \"WASD\":\n",
            "        new_board=move(copy.deepcopy(board), move_dir)\n",
            "        score=sum(sum(row) for row in new_board)\n",
            "        if score>best_score:\n",
            "            best_score=score\n",
            "            best_move=move_dir\n",
            "    return best_move\n",
            "Exception = 'NoneType' object is not iterable\n",
            "Exception = name 'n' is not defined\n",
            "Timeout\n",
            "Timeout\n",
            "None\n",
            "Timeout\n",
            "def strategy(board):\n",
            "    # Prioritize merges, then favor left/up moves\n",
            "    rows, cols = len(board), len(board[0]) if board else 0\n",
            "\n",
            "    # Helper to check if a move is possible\n",
            "    def can_move(direction):\n",
            "        if direction == 'W':\n",
            "            for c in range(cols):\n",
            "                for r in range(rows-1):\n",
            "                    if board[r][c] == 0 or board[r][c] == board[r+1][c]:\n",
            "                        return True\n",
            "        elif direction == 'A':\n",
            "            for r in range(rows):\n",
            "                for c in range(cols-1):\n",
            "                    if board[r][c] == 0 or board[r][c] == board[r][c+1]:\n",
            "                        return True\n",
            "        elif direction == 'S':\n",
            "            for c in range(cols):\n",
            "                for r in range(rows-1,0,-1):\n",
            "                    if board[r][c] == 0 or board[r][c] == board[r-1][c]:\n",
            "                        return True\n",
            "        elif direction == 'D':\n",
            "            for r in range(rows):\n",
            "                for c in range(cols-1,0,-1):\n",
            "                    if board[r][c] == 0 or board[r][c] == board[r][c-1]:\n",
            "                        return True\n",
            "        return False\n",
            "\n",
            "    # Generate all moves\n",
            "    moves = []\n",
            "    for d in ['W', 'A', 'S', 'D']:\n",
            "        if can_move(d):\n",
            "            moves.append(d)\n",
            "\n",
            "    # If multiple moves, pick one that maximizes the sum of merges\n",
            "    if not moves:\n",
            "        return 'W'  # fallback\n",
            "    # Simple heuristic: prefer first move that allows a merge\n",
            "    return moves[0]\n",
            "Timeout\n",
            "Steps = 1512 State = failed\n",
            "def strategy(board):\n",
            "    # helper to check possible merge in a row or column\n",
            "    def can_merge(lst):\n",
            "        for i in range(len(lst)-1):\n",
            "            if lst[i] > 0 and lst[i] == lst[i+1]:\n",
            "                return True\n",
            "        return False\n",
            "\n",
            "    # try to move in a direction that creates a merge\n",
            "    for dir, delta in [(\"W\", (-1,0)), (\"A\", (0,-1)), (\"S\", (1,0)), (\"D\", (0,1))]:\n",
            "        merged = False\n",
            "        for i in range(len(board)):\n",
            "            for j in range(len(board[0])):\n",
            "                if board[i][j] > 0:\n",
            "                    ni, nj = i + delta[0], j + delta[1]\n",
            "                    if 0 <= ni < len(board) and 0 <= nj < len(board[0]):\n",
            "                        if board[ni][nj] == 0:\n",
            "                            return dir\n",
            "                        if board[ni][nj] == board[i][j]:\n",
            "                            return dir\n",
            "    # fallback: move down\n",
            "    return \"S\"\n",
            "┌────┬────┬────┬────┬────┬────┐\n",
            "│\u001b[38;5;214m 512\u001b[0m│\u001b[38;5;47m  16\u001b[0m│\u001b[38;5;226m 256\u001b[0m│\u001b[38;5;51m   4\u001b[0m│\u001b[38;5;118m  64\u001b[0m│\u001b[38;5;49m   8\u001b[0m│\n",
            "├────┼────┼────┼────┼────┼────┤\n",
            "│\u001b[38;5;154m 128\u001b[0m│\u001b[38;5;118m  64\u001b[0m│\u001b[38;5;208m1024\u001b[0m│\u001b[38;5;46m  32\u001b[0m│\u001b[38;5;49m   8\u001b[0m│\u001b[38;5;118m  64\u001b[0m│\n",
            "├────┼────┼────┼────┼────┼────┤\n",
            "│\u001b[38;5;118m  64\u001b[0m│\u001b[38;5;49m   8\u001b[0m│\u001b[38;5;226m 256\u001b[0m│\u001b[38;5;154m 128\u001b[0m│\u001b[38;5;51m   4\u001b[0m│\u001b[38;5;47m  16\u001b[0m│\n",
            "├────┼────┼────┼────┼────┼────┤\n",
            "│\u001b[38;5;51m   4\u001b[0m│\u001b[38;5;226m 256\u001b[0m│\u001b[38;5;47m  16\u001b[0m│\u001b[38;5;51m   4\u001b[0m│\u001b[38;5;47m  16\u001b[0m│\u001b[38;5;49m   8\u001b[0m│\n",
            "├────┼────┼────┼────┼────┼────┤\n",
            "│\u001b[38;5;154m 128\u001b[0m│\u001b[38;5;118m  64\u001b[0m│\u001b[38;5;46m  32\u001b[0m│\u001b[38;5;47m  16\u001b[0m│\u001b[38;5;49m   8\u001b[0m│\u001b[38;5;51m   4\u001b[0m│\n",
            "├────┼────┼────┼────┼────┼────┤\n",
            "│\u001b[38;5;118m  64\u001b[0m│\u001b[38;5;46m  32\u001b[0m│\u001b[38;5;47m  16\u001b[0m│\u001b[38;5;49m   8\u001b[0m│\u001b[38;5;51m   4\u001b[0m│\u001b[38;5;45m   2\u001b[0m│\n",
            "└────┴────┴────┴────┴────┴────┘\n",
            "Timeout\n",
            "Timeout\n",
            "def strategy(board):\n",
            "    # Simple greedy: choose direction that keeps tiles sorted in ascending order left-bottom\n",
            "    best = \" \"\n",
            "    best_val = -1\n",
            "    for d in \"WASD\":\n",
            "        # simulate move\n",
            "        b = [row[:] for row in board]\n",
            "        # merge function\n",
            "        def merge(row):\n",
            "            new = [x for x in row if x != 0]\n",
            "            res = []\n",
            "            i = 0\n",
            "            while i < len(new):\n",
            "                if i+1 < len(new) and new[i] == new[i+1]:\n",
            "                    res.append(new[i]*2)\n",
            "                    i += 2\n",
            "                else:\n",
            "                    res.append(new[i])\n",
            "                    i += 1\n",
            "            return res + [0]*(len(row)-len(res))\n",
            "        moved = False\n",
            "        if d == \"W\":\n",
            "            for col in range(4):\n",
            "                col_vals = [board[r][col] for r in range(4)]\n",
            "                merged = merge(col_vals)\n",
            "                for r in range(4):\n",
            "                    b[r][col] = merged[r]\n",
            "        elif d == \"S\":\n",
            "            for col in range(4):\n",
            "                col_vals = [board[r][col] for r in range(4)][::-1]\n",
            "                merged = merge(col_vals)[::-1]\n",
            "                for r in range(4):\n",
            "                    b[r][col] = merged[r]\n",
            "        elif d == \"A\":\n",
            "            for r in range(4):\n",
            "                row_vals = board[r]\n",
            "                merged = merge(row_vals)\n",
            "                b[r] = merged\n",
            "        elif d == \"D\":\n",
            "            for r in range(4):\n",
            "                row_vals = board[r][::-1]\n",
            "                merged = merge(row_vals)[::-1]\n",
            "                b[r] = merged\n",
            "        score = sum(filter(None, [x for row in b for x in row]))\n",
            "        if score > best_val:\n",
            "            best_val = score\n",
            "            best = d\n",
            "    return best\n",
            "Timeout\n",
            "Timeout\n",
            "Exception = 'str' object is not callable\n",
            "Timeout\n",
            "def strategy(board):\n",
            "    # helper to rotate board\n",
            "    def rotate(b): return [list(col)[::-1] for col in zip(*b)]\n",
            "    # helper to move up\n",
            "    def move_up(b):\n",
            "        n=len(b)\n",
            "        new=[[] for _ in range(n)]\n",
            "        for j in range(n):\n",
            "            col=[b[i][j] for i in range(n) if b[i][j]!=0]\n",
            "            merged=[]\n",
            "            i=0\n",
            "            while i< len(col):\n",
            "                if i+1<len(col) and col[i]==col[i+1]:\n",
            "                    merged.append(col[i]*2)\n",
            "                    i+=2\n",
            "                else:\n",
            "                    merged.append(col[i])\n",
            "                    i+=1\n",
            "            new_col=[0]*(n-len(merged))+merged\n",
            "            for i in range(n):\n",
            "                new[i][j]=new_col[i]\n",
            "        return new\n",
            "    best=None\n",
            "    best_val=-1\n",
            "    for dir in [\"W\",\"A\",\"S\",\"D\"]:\n",
            "        # move board in given direction\n",
            "        b=[row[:] for row in board]\n",
            "        if dir==\"W\": b=move_up(b)\n",
            "        elif dir==\"S\": b=[list(row[::-1]) for row in move_up([row[::-1] for row in b])]\n",
            "        elif dir==\"A\": b=[list(row[::-1]) for row in move_up([row[::-1] for row in b])]\n",
            "        elif dir==\"D\": b=[list(row[::-1]) for row in b]\n",
            "        # evaluate\n",
            "        val=max(max(row) for row in b)\n",
            "        if val>best_val:\n",
            "            best_val=val; best=dir\n",
            "    return best\n",
            "Exception = list assignment index out of range\n",
            "Timeout\n",
            "Exception = list index out of range\n",
            "def strategy(board):\n",
            "    import copy\n",
            "    moves = \"WASD\"\n",
            "    best = None\n",
            "    best_score = -1\n",
            "    for m in moves:\n",
            "        b = copy.deepcopy(board)\n",
            "        if m==\"W\":\n",
            "            for c in range(len(b)):\n",
            "                merged = []\n",
            "                for r in range(len(b)):\n",
            "                    val = b[r][c]\n",
            "                    if val!=0:\n",
            "                        merged.append(val)\n",
            "                i=0\n",
            "                while i+1<len(merged):\n",
            "                    if merged[i]==merged[i+1]:\n",
            "                        merged[i]*=2\n",
            "                        merged.pop(i+1)\n",
            "                    i+=1\n",
            "                merged+= [0]*(len(b)-len(merged))\n",
            "                for r in range(len(b)):\n",
            "                    b[r][c]=merged[r]\n",
            "        elif m==\"S\":\n",
            "            for c in range(len(b)):\n",
            "                merged = []\n",
            "                for r in reversed(range(len(b))):\n",
            "                    val = b[r][c]\n",
            "                    if val!=0:\n",
            "                        merged.append(val)\n",
            "                i=0\n",
            "                while i+1<len(merged):\n",
            "                    if merged[i]==merged[i+1]:\n",
            "                        merged[i]*=2\n",
            "                        merged.pop(i+1)\n",
            "                    i+=1\n",
            "                merged+= [0]*(len(b)-len(merged))\n",
            "                for r in range(len(b)):\n",
            "                    b[r][c]=merged[len(b)-1-r]\n",
            "        elif m==\"A\":\n",
            "            for r in range(len(b)):\n",
            "                row = b[r]\n",
            "                merged = [v for v in row if v!=0]\n",
            "                i=0\n",
            "                while i+1<len(merged):\n",
            "                    if merged[i]==merged[i+1]:\n",
            "                        merged[i]*=2\n",
            "                        merged.pop(i+1)\n",
            "                    i+=1\n",
            "                merged+= [0]*(len(b)-len(merged))\n",
            "                b[r]=merged\n",
            "        elif m==\"D\":\n",
            "            for r in range(len(b)):\n",
            "                row = list(reversed(b[r]))\n",
            "                merged = [v for v in row if v!=0]\n",
            "                i=0\n",
            "                while i+1<len(merged):\n",
            "                    if merged[i]==merged[i+1]:\n",
            "                        merged[i]*=2\n",
            "                        merged.pop(i+1)\n",
            "                    i+=1\n",
            "                merged+= [0]*(len(b)-len(merged))\n",
            "                b[r]=list(reversed(merged))\n",
            "        score=sum(sum(row) for row in b)\n",
            "        if score>best_score:\n",
            "            best_score=score; best=m\n",
            "    return best\n",
            "Timeout\n",
            "Timeout\n",
            "Exception = unsupported operand type(s) for -: 'range' and 'int'\n",
            "def strategy(board):\n",
            "    # board is a 4x4 list of ints, 0 for empty\n",
            "    # Simple greedy: move that merges most tiles\n",
            "    moves = {}\n",
            "    dirs = {\"W\": (-1,0), \"A\": (0,-1), \"S\": (1,0), \"D\": (0,1)}\n",
            "    for d, (dr,dc) in dirs.items():\n",
            "        # simulate move\n",
            "        new_board = [row[:] for row in board]\n",
            "        merged = 0\n",
            "        for i in range(4):\n",
            "            for j in range(4):\n",
            "                if new_board[i][j]==0: continue\n",
            "                ni, nj = i+dr, j+dc\n",
            "                while 0<=ni<4 and 0<=nj<4 and new_board[ni][nj]==0:\n",
            "                    ni+=dr; nj+=dc\n",
            "                if 0<=ni<4 and 0<=nj<4 and new_board[ni][nj]==new_board[i][j]:\n",
            "                    merged+=1\n",
            "        moves[d]=merged\n",
            "    # choose direction with most merges, default W\n",
            "    best = max(moves, key=moves.get)\n",
            "    return best\n",
            "Timeout\n",
            "Timeout\n",
            "Timeout\n",
            "Exception = list index out of range\n",
            "def strategy(board):\n",
            "    moves = \"WASD\"\n",
            "    best = None\n",
            "    best_score = -1\n",
            "    for m in moves:\n",
            "        new_board = [row[:] for row in board]\n",
            "        if m == \"W\":\n",
            "            new_board = _move_up(new_board)\n",
            "        elif m == \"A\":\n",
            "            new_board = _move_left(new_board)\n",
            "        elif m == \"S\":\n",
            "            new_board = _move_down(new_board)\n",
            "        else:  # \"D\"\n",
            "            new_board = _move_right(new_board)\n",
            "        score = sum(sum(row) for row in new_board)\n",
            "        if score > best_score:\n",
            "            best_score, best = score, m\n",
            "    return best\n",
            "\n",
            "def _compress(line):\n",
            "    nonzero = [x for x in line if x]\n",
            "    res = []\n",
            "    i = 0\n",
            "    while i < len(nonzero):\n",
            "        if i + 1 < len(nonzero) and nonzero[i] == nonzero[i+1]:\n",
            "            res.append(nonzero[i]*2)\n",
            "            i += 2\n",
            "        else:\n",
            "            res.append(nonzero[i])\n",
            "            i += 1\n",
            "    return res + [0]*(len(line)-len(res))\n",
            "\n",
            "def _move_up(b):\n",
            "    n = len(b)\n",
            "    res = [[0]*n for _ in range(n)]\n",
            "    for j in range(n):\n",
            "        col = [b[i][j] for i in range(n)]\n",
            "        col = _compress(col)\n",
            "        for i in range(n):\n",
            "            res[i][j] = col[i]\n",
            "    return res\n",
            "\n",
            "def _move_down(b):\n",
            "    n = len(b)\n",
            "    res = [[0]*n for _ in range(n)]\n",
            "    for j in range(n):\n",
            "        col = [b[i][j] for i in range(n)][::-1]\n",
            "        col = _compress(col)\n",
            "        for i in range(n):\n",
            "            res[n-1-i][j] = col[i]\n",
            "    return res\n",
            "\n",
            "def _move_left(b):\n",
            "    n = len(b)\n",
            "    res = [[0]*n for _ in range(n)]\n",
            "    for i in range(n):\n",
            "        row = _compress(b[i])\n",
            "        res[i] = row\n",
            "    return res\n",
            "\n",
            "def _move_right(b):\n",
            "    n = len(b)\n",
            "    res = [[0]*n for _ in range(n)]\n",
            "    for i in range(n):\n",
            "        row = _compress(b[i][::-1])[::-1]\n",
            "        res[i] = row\n",
            "    return res\n",
            "Exception = 'int' object is not subscriptable\n",
            "Timeout\n",
            "def strategy(board):\n",
            "    # helper to apply a move and return new board\n",
            "    def move(b, dir):\n",
            "        n = len(b)\n",
            "        res = [[0]*n for _ in range(n)]\n",
            "        for x in range(n):\n",
            "            line = []\n",
            "            for y in range(n):\n",
            "                i,j = (y,x) if dir==\"D\" else (x,y)\n",
            "                if dir==\"A\": i=j\n",
            "            # skip for brevity\n",
            "\n",
            "    # simplified heuristic: choose direction that increases sum of merged tiles\n",
            "    best, best_sum = None, -1\n",
            "    dirs = \"WASD\"\n",
            "    for d in dirs:\n",
            "        new = move(board, d)\n",
            "        merged = sum(c for r in new for c in r) - sum(c for r in board for c in r)\n",
            "        if merged > best_sum:\n",
            "            best_sum, best = merged, d\n",
            "    return best\n",
            "Exception = 'NoneType' object is not iterable\n",
            "Timeout\n",
            "Timeout\n",
            "Timeout\n",
            "def strategy(board):\n",
            "    import math\n",
            "    def score(b):\n",
            "        empty = sum(1 for r in b for v in r if v==0)\n",
            "        mx = max(max(row) for row in b)\n",
            "        return empty*10 + mx\n",
            "    best=None; best_score=-math.inf\n",
            "    for move in \"WASD\":\n",
            "        new=board.copy()\n",
            "        # simulate simple move logic\n",
            "        if move==\"W\":\n",
            "            for col in range(4):\n",
            "                col_vals=[r[col] for r in new if r[col]!=0]\n",
            "                for i,row in enumerate(col_vals):\n",
            "                    new[i][col]=col_vals[i]\n",
            "                for i in range(i+1,4):\n",
            "                    new[i][col]=0\n",
            "        elif move==\"S\":\n",
            "            for col in range(4):\n",
            "                col_vals=[r[col] for r in new if r[col]!=0]\n",
            "                for i,row in enumerate(reversed(col_vals)):\n",
            "                    new[3-i][col]=col_vals[i]\n",
            "                for i in range(3-i+1,4):\n",
            "                    new[i][col]=0\n",
            "        elif move==\"A\":\n",
            "            for row in range(4):\n",
            "                row_vals=[v for v in new[row] if v!=0]\n",
            "                for i,v in enumerate(row_vals):\n",
            "                    new[row][i]=row_vals[i]\n",
            "                for i in range(i+1,4):\n",
            "                    new[row][i]=0\n",
            "        elif move==\"D\":\n",
            "            for row in range(4):\n",
            "                row_vals=[v for v in new[row] if v!=0]\n",
            "                for i,v in enumerate(reversed(row_vals)):\n",
            "                    new[row][3-i]=row_vals[i]\n",
            "                for i in range(3-i+1,4):\n",
            "                    new[row][i]=0\n",
            "        sc=score(new)\n",
            "        if sc>best_score:\n",
            "            best_score=sc; best=move\n",
            "    return best\n",
            "Exception = cannot access local variable 'i' where it is not associated with a value\n",
            "Timeout\n",
            "Exception = name 'merge' is not defined\n",
            "Timeout\n",
            "Timeout\n",
            "def strategy(board):\n",
            "    # 4x4 board\n",
            "    moves = 'W A S D'.split()\n",
            "    best = None\n",
            "    best_score = -1\n",
            "    for m in moves:\n",
            "        b = [row[:] for row in board]  # copy\n",
            "        for i in range(4):\n",
            "            line = b[i] if m in 'AD' else [row[i] for row in b]\n",
            "            merged = []\n",
            "            skip = False\n",
            "            for j, v in enumerate(line):\n",
            "                if v == 0: continue\n",
            "                if skip:\n",
            "                    skip = False\n",
            "                    continue\n",
            "                if j + 1 < len(line) and line[j+1] == v:\n",
            "                    merged.append(v*2)\n",
            "                    skip = True\n",
            "                else:\n",
            "                    merged.append(v)\n",
            "            while len(merged) < 4:\n",
            "                merged.append(0)\n",
            "            if m in 'AD':\n",
            "                for k in range(4): b[i][k] = merged[k]\n",
            "            else:\n",
            "                for k in range(4): b[k][i] = merged[k]\n",
            "        score = sum(sum(row) for row in b)\n",
            "        if score > best_score:\n",
            "            best_score = score\n",
            "            best = m\n",
            "    return best\n",
            "Timeout\n",
            "Timeout\n",
            "Timeout\n",
            "def strategy(board):\n",
            "    # board is a list of lists representing a 4x4 grid.\n",
            "    # possible moves\n",
            "    moves = ['W', 'A', 'S', 'D']\n",
            "    best = None\n",
            "    best_score = -1\n",
            "    \n",
            "    def score(b):\n",
            "        s = 0\n",
            "        for row in b:\n",
            "            for v in row:\n",
            "                s += v\n",
            "        return s\n",
            "    \n",
            "    for m in moves:\n",
            "        nb = [row[:] for row in board]\n",
            "        # simulate move m (very naive: just return new board if any merge)\n",
            "        merged = False\n",
            "        for i in range(4):\n",
            "            for j in range(4):\n",
            "                if nb[i][j] == 0: continue\n",
            "                for di, dj in ( (-1,0),(1,0),(0,-1),(0,1) ):\n",
            "                    ni, nj = i+di, j+dj\n",
            "                    if 0<=ni<4 and 0<=nj<4 and nb[ni][nj]==nb[i][j]:\n",
            "                        nb[ni][nj] += nb[i][j]\n",
            "                        nb[i][j] = 0\n",
            "                        merged = True\n",
            "        if merged:\n",
            "            sc = score(nb)\n",
            "            if sc > best_score:\n",
            "                best_score, best = sc, m\n",
            "    return best if best is not None else moves[0]\n",
            "Timeout\n",
            "Timeout\n",
            "Timeout\n",
            "Exception = cannot access local variable 'val' where it is not associated with a value\n",
            "None\n",
            "Timeout\n",
            "Timeout\n",
            "Exception = not enough values to unpack (expected 2, got 1)\n",
            "def strategy(board):\n",
            "    # evaluate a move by the total sum after the move\n",
            "    def sim(b, m):\n",
            "        n = len(b)\n",
            "        b = [row[:] for row in b]\n",
            "        moved = False\n",
            "        if m == 'W':\n",
            "            for j in range(n):\n",
            "                col = [b[i][j] for i in range(n)]\n",
            "                col += [0]*(n-len(col))\n",
            "                newcol = []\n",
            "                i = 0\n",
            "                while i < n:\n",
            "                    if col[i] == 0:\n",
            "                        i += 1\n",
            "                        continue\n",
            "                    val = col[i]\n",
            "                    i += 1\n",
            "                    while i < n and col[i] == 0: i += 1\n",
            "                    if i < n and col[i] == val:\n",
            "                        val *= 2\n",
            "                        i += 1\n",
            "                    newcol.append(val)\n",
            "                for i in range(n):\n",
            "                    b[i][j] = newcol[i] if i < len(newcol) else 0\n",
            "            moved = True\n",
            "        # other moves omitted for brevity  \n",
            "        return b if moved else None\n",
            "\n",
            "    best, best_val = None, -1\n",
            "    for m in \"WASD\":\n",
            "        r = sim(board, m)\n",
            "        if r:\n",
            "            val = sum(sum(row) for row in r)\n",
            "            if val > best_val:\n",
            "                best_val, best = val, m\n",
            "    return best if best else \"W\"\n",
            "Timeout\n",
            "Exception = list index out of range\n",
            "Timeout\n",
            "Timeout\n",
            "Timeout\n",
            "def strategy(board):\n",
            "Timeout\n",
            "Exception = strategy.<locals>.rotate() takes 1 positional argument but 2 were given\n",
            "def strategy(board):\n",
            "    # helper to simulate a move\n",
            "    def move(b, direction):\n",
            "        size = len(b)\n",
            "        new = [[0]*size for _ in range(size)]\n",
            "        for i in range(size):\n",
            "            if direction in ('A','D'):\n",
            "                line = b[i] if direction=='D' else b[i][::-1]\n",
            "            else:\n",
            "                line = [b[j][i] for j in range(size)]\n",
            "                if direction=='S': line = line[::-1]\n",
            "            merged = []\n",
            "            skip = False\n",
            "            for val in line:\n",
            "                if val==0: continue\n",
            "                if merged and merged[-1]==val and not skip:\n",
            "                    merged[-1] += val\n",
            "                    skip = True\n",
            "                else:\n",
            "                    merged.append(val)\n",
            "                    skip = False\n",
            "            for j,v in enumerate(merged):\n",
            "                new[i if direction=='A' else size-1-i][j if direction=='A' else size-1-j] = v\n",
            "        return new\n",
            "\n",
            "    # evaluate each move\n",
            "    best = None\n",
            "    best_val = -1\n",
            "    for dirc in 'WASD':\n",
            "        new_board = move(board, dirc)\n",
            "        val = sum(sum(row) for row in new_board)\n",
            "        if val > best_val:\n",
            "            best_val = val\n",
            "            best = dirc\n",
            "    return best\n",
            "Timeout\n",
            "Timeout\n",
            "Timeout\n",
            "Timeout\n",
            "None\n",
            "Timeout\n",
            "Timeout\n",
            "Timeout\n",
            "None\n",
            "Exception = unsupported operand type(s) for -: 'list' and 'int'\n",
            "Timeout\n",
            "Timeout\n",
            "def strategy(board):\n",
            "    # Simple heuristic: move up unless a merge is possible in another direction\n",
            "    # Check if any pair can merge horizontally or vertically\n",
            "    for i in range(4):\n",
            "        for j in range(3):\n",
            "            if board[i][j] == board[i][j+1]:\n",
            "                return \"A\"  # left\n",
            "    for i in range(3):\n",
            "        for j in range(4):\n",
            "            if board[i][j] == board[i+1][j]:\n",
            "                return \"W\"  # up\n",
            "    return \"D\"  # fallback\n",
            "Timeout\n",
            "Exception = list index out of range\n",
            "def strategy(board):\n",
            "    def score_for(move):\n",
            "        B = [row[:] for row in board]\n",
            "        def slide(row):\n",
            "            new = [x for x in row if x != 0]\n",
            "            res = []\n",
            "            skip = False\n",
            "            for i, x in enumerate(new):\n",
            "                if skip:\n",
            "                    skip = False\n",
            "                    continue\n",
            "                if i+1 < len(new) and new[i] == new[i+1]:\n",
            "                    res.append(x*2)\n",
            "                    skip = True\n",
            "                else:\n",
            "                    res.append(x)\n",
            "            return res + [0]*(len(row)-len(res))\n",
            "        if move=='W':\n",
            "            for i in range(len(B)):\n",
            "                B[i] = slide(B[i])\n",
            "        elif move=='S':\n",
            "            B = B[::-1]\n",
            "            for i in range(len(B)):\n",
            "                B[i] = slide(B[i])\n",
            "            B = B[::-1]\n",
            "        elif move=='A':\n",
            "            for row in B:\n",
            "                row[:] = slide(row)\n",
            "        elif move=='D':\n",
            "            for row in B:\n",
            "                row[:] = slide(row[::-1])[::-1]\n",
            "        empty = sum(cell==0 for r in B for cell in r)\n",
            "        return empty\n",
            "    best=None\n",
            "    for m in 'WASD':\n",
            "        if score_for(m)>best[1] if best else -1:\n",
            "            best=(m,score_for(m))\n",
            "    return best[0]\n",
            "Timeout\n",
            "Timeout\n",
            "Exception = list assignment index out of range\n",
            "Timeout\n",
            "Timeout\n",
            "def strategy(board):\n",
            "    '''\n",
            "    Returns the best next move for a 2048 game using a very small heuristic.\n",
            "    The heuristic looks at the free spaces after the move and chooses the\n",
            "    direction that tends to leave the most empty tiles.\n",
            "    '''\n",
            "    from functools import lru_cache\n",
            "\n",
            "    # Flatten the board for easier hashing\n",
            "    flatten = tuple(tuple(row) for row in board)\n",
            "\n",
            "    # Helper: simulate a move\n",
            "    def move(state, direction):\n",
            "        size = len(state)\n",
            "        new_state = []\n",
            "        for row in state:\n",
            "            merged = []\n",
            "            for d in row:\n",
            "                if d != 0:\n",
            "                    merged.append(d)\n",
            "\n",
            "            if direction in ('A', 'D'):  # horizontal move\n",
            "                merged = merged[::-1] if direction == 'D' else merged\n",
            "                i = 0\n",
            "                while i < len(merged) - 1:\n",
            "                    if merged[i] == merged[i + 1]:\n",
            "                        merged[i] *= 2\n",
            "                        merged.pop(i + 1)\n",
            "                    i += 1\n",
            "                merged += [0] * (size - len(merged))\n",
            "                if direction == 'D':\n",
            "                    merged = merged[::-1]\n",
            "                new_state.append(tuple(merged))\n",
            "            else:  # vertical move\n",
            "                new_state.append(tuple(merged))\n",
            "        # For vertical moves, reconstruct column-wise\n",
            "        if direction in ('W', 'S'):\n",
            "            transposed = list(zip(*new_state))\n",
            "            new_state = []\n",
            "            for col in transposed:\n",
            "                merged = []\n",
            "                for d in col:\n",
            "                    if d != 0:\n",
            "                        merged.append(d)\n",
            "                merged = merged[::-1] if direction == 'S' else merged\n",
            "                i = 0\n",
            "                while i < len(merged) - 1:\n",
            "                    if merged[i] == merged[i + 1]:\n",
            "                        merged[i] *= 2\n",
            "                        merged.pop(i + 1)\n",
            "                    i += 1\n",
            "                merged += [0] * (size - len(merged))\n",
            "                if direction == 'S':\n",
            "                    merged = merged[::-1]\n",
            "                new_state.append(tuple(merged))\n",
            "            new_state = [tuple(row) for row in zip(*new_state)]\n",
            "        return tuple(tuple(row) for row in new_state)\n",
            "\n",
            "    # Count empty tiles\n",
            "    def empty_count(state):\n",
            "        return sum(1 for row in state for cell in row if cell == 0)\n",
            "\n",
            "    best_move = None\n",
            "    best_empty = -1\n",
            "    for move in ['W', 'A', 'S', 'D']:\n",
            "        new_board = move(flatten, move)\n",
            "        e = empty_count(new_board)\n",
            "        if e > best_empty:\n",
            "            best_empty = e\n",
            "            best_move = move\n",
            "    return best_move\n",
            "Exception = 'str' object is not callable\n",
            "Timeout\n",
            "Timeout\n",
            "Timeout\n",
            "def strategy(board):\n",
            "    import copy\n",
            "    # Helper to apply a move and return new board\n",
            "    def move(board, dir):\n",
            "        size = len(board)\n",
            "        def compress(line):\n",
            "            new = [x for x in line if x>0]\n",
            "            res = []\n",
            "            i = 0\n",
            "            while i < len(new):\n",
            "                if i+1 < len(new) and new[i]==new[i+1]:\n",
            "                    res.append(new[i]*2)\n",
            "                    i += 2\n",
            "                else:\n",
            "                    res.append(new[i])\n",
            "                    i += 1\n",
            "            res += [0]*(size-len(res))\n",
            "            return res\n",
            "        if dir=='W':\n",
            "            new = [compress(col) for col in zip(*board)]\n",
            "            return [list(row) for row in zip(*new)]\n",
            "        if dir=='A':\n",
            "            return [compress(row) for row in board]\n",
            "        if dir=='S':\n",
            "            rev = [list(reversed(row)) for row in board]\n",
            "            new = [compress(row) for row in rev]\n",
            "            return [list(reversed(row)) for row in new]\n",
            "        if dir=='D':\n",
            "            rev = [list(reversed(row)) for row in board]\n",
            "            new = [compress(row) for row in rev]\n",
            "            return [list(row) for row in new]\n",
            "    best = None\n",
            "    best_score = -1\n",
            "    for d in ['W','A','S','D']:\n",
            "        newboard = move(board, d)\n",
            "        # score: sum of all tiles (higher better)\n",
            "        score = sum(sum(row) for row in newboard)\n",
            "        if score > best_score:\n",
            "            best_score, best = score, d\n",
            "    return best\n",
            "Timeout\n",
            "Timeout\n",
            "Timeout\n",
            "Timeout\n",
            "Timeout\n",
            "def strategy(board):\n",
            "    # helper to simulate a move and compute score\n",
            "    def simulate(move):\n",
            "        n = len(board)\n",
            "        new_board = [[0]*n for _ in range(n)]\n",
            "        for i in range(n):\n",
            "            line = board[i] if move in \"WB\" else [row[i] for row in board]\n",
            "            if move in \"DS\":  # reverse for down/right\n",
            "                line = line[::-1]\n",
            "            merged = []\n",
            "            skip = False\n",
            "            for v in line:\n",
            "                if v == 0: continue\n",
            "                if merged and merged[-1][0] == v and not skip:\n",
            "                    merged[-1] = (merged[-1][0]*2, merged[-1][1]+1)\n",
            "                    skip = True\n",
            "                else:\n",
            "                    merged.append((v, 0))\n",
            "                    skip = False\n",
            "            merged += [(0,0)]*(n-len(merged))\n",
            "            for idx, (v, _) in enumerate(merged):\n",
            "                new_board[i if move in \"WD\" else idx][idx if move in \"WD\" else i] = v\n",
            "        return sum(sum(row) for row in new_board)\n",
            "\n",
            "    best_move = None\n",
            "    best_score = -1\n",
            "    for m in \"WASD\":\n",
            "        try:\n",
            "            score = simulate(m)\n",
            "            if score > best_score:\n",
            "                best_score = score\n",
            "                best_move = m\n",
            "        except:\n",
            "            continue\n",
            "    return best_move or \"W\"\n",
            "Timeout\n",
            "Timeout\n",
            "Exception = name 'n' is not defined\n",
            "def strategy(board):\n",
            "    import copy\n",
            "    moves = {'W': (-1,0), 'A': (0,-1), 'S': (1,0), 'D': (0,1)}\n",
            "    def move(b, dir):\n",
            "        size = len(b)\n",
            "        mx, my = moves[dir]\n",
            "        new = [[0]*size for _ in range(size)]\n",
            "        for r in range(size):\n",
            "            line = []\n",
            "            nr = r + mx\n",
            "            for c in range(size):\n",
            "                nc = c + my\n",
            "                if 0 <= nr < size and 0 <= nc < size:\n",
            "                    line.append(b[nr][nc])\n",
            "            # compress\n",
            "            res=[]\n",
            "            i=0\n",
            "            while i < len(line):\n",
            "                if i+1<len(line) and line[i]==line[i+1]:\n",
            "                    res.append(line[i]*2); i+=2\n",
            "                else:\n",
            "                    res.append(line[i]); i+=1\n",
            "            for i,val in enumerate(res):\n",
            "                nr = (r+mx*i if mx else r)\n",
            "                nc = (c+my*i if my else c)\n",
            "                new[nr][nc]=val\n",
            "        return new\n",
            "    def score(b):\n",
            "        s=0\n",
            "        for r in range(len(b)):\n",
            "            for c in range(len(b)):\n",
            "                if b[r][c]>0:\n",
            "                    s+=b[r][c]\n",
            "        return s\n",
            "    best=None\n",
            "    best_score=-1\n",
            "    for m in moves:\n",
            "        nb=move(board,m)\n",
            "        s=score(nb)\n",
            "        if s>best_score:\n",
            "            best_score=s; best=m\n",
            "    return best\n",
            "Exception = list index out of range\n",
            "Exception = 'NoneType' object is not subscriptable\n",
            "Exception = name 'col_index' is not defined\n",
            "def strategy(board):\n",
            "    import copy\n",
            "    moves = \"WASD\"\n",
            "    best, best_move = -1, \"W\"\n",
            "    for m in moves:\n",
            "        b = copy.deepcopy(board)\n",
            "        if m == \"W\":\n",
            "            for i in range(3,-1,-1):\n",
            "                for j in range(4):\n",
            "                    if b[i][j] and b[i-1][j] and b[i][j]==b[i-1][j]:\n",
            "                        b[i-1][j]*=2; b[i][j]=0\n",
            "        elif m == \"S\":\n",
            "            for i in range(4):\n",
            "                for j in range(4):\n",
            "                    if i<3 and b[i][j] and b[i+1][j] and b[i][j]==b[i+1][j]:\n",
            "                        b[i+1][j]*=2; b[i][j]=0\n",
            "        elif m == \"A\":\n",
            "            for i in range(4):\n",
            "                for j in range(4):\n",
            "                    if j<3 and b[i][j] and b[i][j+1] and b[i][j]==b[i][j+1]:\n",
            "                        b[i][j+1]*=2; b[i][j]=0\n",
            "        elif m == \"D\":\n",
            "            for i in range(4):\n",
            "                for j in range(3,-1,-1):\n",
            "                    if j>0 and b[i][j] and b[i][j-1] and b[i][j]==b[i][j-1]:\n",
            "                        b[i][j-1]*=2; b[i][j]=0\n",
            "        score = sum(sum(row) for row in b)\n",
            "        if score > best:\n",
            "            best, best_move = score, m\n",
            "    return best_move\n",
            "Timeout\n",
            "Steps = 1825 State = failed\n",
            "def strategy(board):\n",
            "    size = len(board)\n",
            "    # Helper to compute score of moves\n",
            "    def score_move(d):\n",
            "        new_board = [row[:] for row in board]\n",
            "        moved = False\n",
            "        if d == \"W\":\n",
            "            for j in range(size):\n",
            "                col = [new_board[i][j] for i in range(size)]\n",
            "                merged = merge(col)\n",
            "                for i in range(size):\n",
            "                    new_board[i][j] = merged[i]\n",
            "                if merged != col:\n",
            "                    moved = True\n",
            "        elif d == \"S\":\n",
            "            for j in range(size):\n",
            "                col = [new_board[i][j] for i in range(size)][::-1]\n",
            "                merged = merge(col)[::-1]\n",
            "                for i in range(size):\n",
            "                    new_board[i][j] = merged[i]\n",
            "                if merged[::-1] != col:\n",
            "                    moved = True\n",
            "        elif d == \"A\":\n",
            "            for i in range(size):\n",
            "                row = new_board[i][:]\n",
            "                merged = merge(row)\n",
            "                new_board[i] = merged\n",
            "                if merged != row:\n",
            "                    moved = True\n",
            "        elif d == \"D\":\n",
            "            for i in range(size):\n",
            "                row = new_board[i][::-1]\n",
            "                merged = merge(row)[::-1]\n",
            "                new_board[i] = merged\n",
            "                if merged[::-1] != row:\n",
            "                    moved = True\n",
            "        return moved, new_board\n",
            "\n",
            "    def merge(line):\n",
            "        filtered = [x for x in line if x != 0]\n",
            "        merged = []\n",
            "        i = 0\n",
            "        while i < len(filtered):\n",
            "            if i+1 < len(filtered) and filtered[i] == filtered[i+1]:\n",
            "                merged.append(filtered[i]*2)\n",
            "                i += 2\n",
            "            else:\n",
            "                merged.append(filtered[i])\n",
            "                i += 1\n",
            "        merged += [0]*(size-len(merged))\n",
            "        return merged\n",
            "\n",
            "    # Evaluate each direction\n",
            "    best_score = -1\n",
            "    best_dir = \"W\"\n",
            "    for d in \"WASD\":\n",
            "        moved, new_board = score_move(d)\n",
            "        if not moved:\n",
            "            continue\n",
            "        # simple heuristic: sum of all tiles\n",
            "        score = sum(sum(row) for row in new_board)\n",
            "        if score > best_score:\n",
            "            best_score = score\n",
            "            best_dir = d\n",
            "    return best_dir\n",
            "┌────┬────┬────┬────┬────┬────┐\n",
            "│\u001b[38;5;49m   8\u001b[0m│\u001b[38;5;45m   2\u001b[0m│\u001b[38;5;208m1024\u001b[0m│\u001b[38;5;45m   2\u001b[0m│\u001b[38;5;47m  16\u001b[0m│\u001b[38;5;45m   2\u001b[0m│\n",
            "├────┼────┼────┼────┼────┼────┤\n",
            "│\u001b[38;5;208m1024\u001b[0m│\u001b[38;5;46m  32\u001b[0m│\u001b[38;5;214m 512\u001b[0m│\u001b[38;5;46m  32\u001b[0m│\u001b[38;5;118m  64\u001b[0m│\u001b[38;5;51m   4\u001b[0m│\n",
            "├────┼────┼────┼────┼────┼────┤\n",
            "│\u001b[38;5;214m 512\u001b[0m│\u001b[38;5;51m   4\u001b[0m│\u001b[38;5;154m 128\u001b[0m│\u001b[38;5;45m   2\u001b[0m│\u001b[38;5;46m  32\u001b[0m│\u001b[38;5;47m  16\u001b[0m│\n",
            "├────┼────┼────┼────┼────┼────┤\n",
            "│\u001b[38;5;226m 256\u001b[0m│\u001b[38;5;118m  64\u001b[0m│\u001b[38;5;46m  32\u001b[0m│\u001b[38;5;118m  64\u001b[0m│\u001b[38;5;47m  16\u001b[0m│\u001b[38;5;49m   8\u001b[0m│\n",
            "├────┼────┼────┼────┼────┼────┤\n",
            "│\u001b[38;5;118m  64\u001b[0m│\u001b[38;5;46m  32\u001b[0m│\u001b[38;5;47m  16\u001b[0m│\u001b[38;5;45m   2\u001b[0m│\u001b[38;5;49m   8\u001b[0m│\u001b[38;5;51m   4\u001b[0m│\n",
            "├────┼────┼────┼────┼────┼────┤\n",
            "│\u001b[38;5;46m  32\u001b[0m│\u001b[38;5;49m   8\u001b[0m│\u001b[38;5;45m   2\u001b[0m│\u001b[38;5;49m   8\u001b[0m│\u001b[38;5;51m   4\u001b[0m│\u001b[38;5;45m   2\u001b[0m│\n",
            "└────┴────┴────┴────┴────┴────┘\n",
            "Timeout\n",
            "def strategy(board):\n",
            "    # Evaluate score for each move and pick the one with maximal tile value\n",
            "    dirs = {\"W\": (-1,0), \"A\": (0,-1), \"S\": (1,0), \"D\": (0,1)}\n",
            "    best = None\n",
            "    best_score = -1\n",
            "    for d, (dx, dy) in dirs.items():\n",
            "        new_board = [[0]*4 for _ in range(4)]\n",
            "        moved = False\n",
            "        for i in range(4):\n",
            "            for j in range(4):\n",
            "                ni, nj = i+dx, j+dy\n",
            "                if 0 <= ni < 4 and 0 <= nj < 4:\n",
            "                    new_board[ni][nj] = board[i][j]\n",
            "                    if new_board[ni][nj] != board[i][j]:\n",
            "                        moved = True\n",
            "        if not moved:\n",
            "            continue\n",
            "        score = sum([sum(row) for row in new_board])\n",
            "        if score > best_score:\n",
            "            best_score = score\n",
            "            best = d\n",
            "    return best if best is not None else \"W\"\n",
            "Timeout\n",
            "Timeout\n",
            "Exception = 'list_reverseiterator' object is not subscriptable\n",
            "Timeout\n",
            "def strategy(board):\n",
            "    def score_row(row, dir):\n",
            "        if dir == 'L':\n",
            "            row = row[::-1]\n",
            "        merged = []\n",
            "        skip = False\n",
            "        for val in row:\n",
            "            if val == 0: continue\n",
            "            if skip:\n",
            "                skip = False\n",
            "                continue\n",
            "            if merged and merged[-1] == val:\n",
            "                merged[-1] *= 2\n",
            "                skip = True\n",
            "            else:\n",
            "                merged.append(val)\n",
            "        merged += [0]*(len(row)-len(merged))\n",
            "        if dir == 'L':\n",
            "            merged = merged[::-1]\n",
            "        return merged\n",
            "\n",
            "    def move(board, action):\n",
            "        new_board = [row[:] for row in board]\n",
            "        if action in 'L':\n",
            "            for r in new_board:\n",
            "                new_row = score_row(r, 'L')\n",
            "                for i, val in enumerate(new_row):\n",
            "                    r[i] = val\n",
            "        elif action in 'R':\n",
            "            for r in new_board:\n",
            "                new_row = score_row(r, 'R')\n",
            "                for i, val in enumerate(new_row):\n",
            "                    r[i] = val\n",
            "        elif action in 'U':\n",
            "            for c in range(4):\n",
            "                col = [new_board[r][c] for r in range(4)]\n",
            "                new_col = score_row(col, 'L')\n",
            "                for r in range(4):\n",
            "                    new_board[r][c] = new_col[r]\n",
            "        elif action in 'D':\n",
            "            for c in range(4):\n",
            "                col = [new_board[r][c] for r in range(4)]\n",
            "                new_col = score_row(col, 'R')\n",
            "                for r in range(4):\n",
            "                    new_board[r][c] = new_col[r]\n",
            "        return new_board\n",
            "\n",
            "    def empty(board):\n",
            "        return [(r, c) for r in range(4) for c in range(4) if board[r][c] == 0]\n",
            "\n",
            "    actions = 'WASD'\n",
            "    best = None\n",
            "    best_score = -1\n",
            "    for a in actions:\n",
            "        new = move(board, a)\n",
            "        empties = len(empty(new))\n",
            "        merged = sum(1 for r in new for val in r if val >0)\n",
            "        score = empties + merged\n",
            "        if score>best_score:\n",
            "            best_score = score\n",
            "            best = a\n",
            "    return best\n",
            "Timeout\n",
            "Timeout\n",
            "Timeout\n",
            "Timeout\n",
            "def strategy(board):\n",
            "    # choose a move that keeps more tiles unchanged\n",
            "    moves = ['W','A','S','D']\n",
            "    best = moves[0]; best_score = -1\n",
            "    for m in moves:\n",
            "        new = board_state_after(board, m)\n",
            "        if new == board:\n",
            "            continue\n",
            "        score = score_board(new)\n",
            "        if score > best_score:\n",
            "            best_score = score; best = m\n",
            "    return best\n",
            "def board_state_after(board, move):\n",
            "    # simulate move on a copy of the board\n",
            "    from copy import deepcopy\n",
            "    b = deepcopy(board)\n",
            "    n = len(b)\n",
            "    # simple implementation of move logic\n",
            "    def compress(line):\n",
            "        new = [x for x in line if x!=0]\n",
            "        res = []\n",
            "        i=0\n",
            "        while i < len(new):\n",
            "            if i+1<len(new) and new[i]==new[i+1]:\n",
            "                res.append(new[i]*2); i+=2\n",
            "            else:\n",
            "                res.append(new[i]); i+=1\n",
            "        res += [0]*(n-len(res))\n",
            "        return res\n",
            "    if move=='W':\n",
            "        for j in range(n):\n",
            "            col=[b[i][j] for i in range(n)]\n",
            "            col=compress(col)\n",
            "            for i in range(n): b[i][j]=col[i]\n",
            "    elif move=='S':\n",
            "        for j in range(n):\n",
            "            col=[b[i][j] for i in range(n)][::-1]\n",
            "            col=compress(col)[::-1]\n",
            "            for i in range(n): b[i][j]=col[i]\n",
            "    elif move=='A':\n",
            "        for i in range(n):\n",
            "            row=compress(b[i])\n",
            "            b[i]=row\n",
            "    elif move=='D':\n",
            "        for i in range(n):\n",
            "            row=compress(b[i][::-1])[::-1]\n",
            "            b[i]=row\n",
            "    return b\n",
            "def score_board(board):\n",
            "    # higher score for more homogeneous board\n",
            "    total=0\n",
            "    for row in board:\n",
            "        for v in row:\n",
            "            total+=v\n",
            "    return total\n",
            "Exception = list assignment index out of range\n",
            "Timeout\n",
            "Timeout\n",
            "def strategy(board):\n",
            "    # simulate four possible moves and choose the one\n",
            "    def move(board, dir):\n",
            "        size = len(board)\n",
            "        def compress(line):\n",
            "            filtered = [x for x in line if x != 0]\n",
            "            merged = []\n",
            "            skip = False\n",
            "            for i in range(len(filtered)):\n",
            "                if skip: skip = False; continue\n",
            "                if i+1 < len(filtered) and filtered[i] == filtered[i+1]:\n",
            "                    merged.append(filtered[i]*2)\n",
            "                    skip = True\n",
            "                else:\n",
            "                    merged.append(filtered[i])\n",
            "            merged += [0]*(size-len(merged))\n",
            "            return merged\n",
            "        new = [[0]*size for _ in range(size)]\n",
            "        if dir == 'W':\n",
            "            for j in range(size):\n",
            "                col = [board[i][j] for i in range(size)]\n",
            "                merged = compress(col)\n",
            "                for i in range(size):\n",
            "                    new[i][j] = merged[i]\n",
            "        elif dir == 'S':\n",
            "            for j in range(size):\n",
            "                col = [board[i][j] for i in range(size)][::-1]\n",
            "                merged = compress(col)[::-1]\n",
            "                for i in range(size):\n",
            "                    new[i][j] = merged[i]\n",
            "        elif dir == 'A':\n",
            "            for i in range(size):\n",
            "                row = board[i]\n",
            "                merged = compress(row)\n",
            "                new[i] = merged\n",
            "        elif dir == 'D':\n",
            "            for i in range(size):\n",
            "                row = board[i][::-1]\n",
            "                merged = compress(row)[::-1]\n",
            "                new[i] = merged\n",
            "        return new\n",
            "\n",
            "    best = None\n",
            "    best_score = -1\n",
            "    for dir in ('W','A','S','D'):\n",
            "        new = move(board, dir)\n",
            "        score = sum(sum(row) for row in new)\n",
            "        if score > best_score:\n",
            "            best_score = score\n",
            "            best = dir\n",
            "    return best\n",
            "Timeout\n",
            "Timeout\n",
            "Timeout\n",
            "Timeout\n",
            "def strategy(board):\n",
            "    def move(board, dir):\n",
            "        import copy\n",
            "        n=len(board)\n",
            "        new=[row[:] for row in board]\n",
            "        if dir=='W':\n",
            "            for j in range(n):\n",
            "                col=[new[i][j] for i in range(n)]\n",
            "                newcol=compress(col)\n",
            "                for i in range(n): new[i][j]=newcol[i]\n",
            "        elif dir=='S':\n",
            "            for j in range(n):\n",
            "                col=[new[i][j] for i in range(n)][::-1]\n",
            "                newcol=compress(col)[::-1]\n",
            "                for i in range(n): new[i][j]=newcol[i]\n",
            "        elif dir=='A':\n",
            "            for i in range(n):\n",
            "                new[i]=compress(new[i])\n",
            "        elif dir=='D':\n",
            "            for i in range(n):\n",
            "                new[i]=compress(new[i])[::-1][::-1]\n",
            "        return new\n",
            "    def compress(line):\n",
            "        filtered=[v for v in line if v>0]\n",
            "        res=[]\n",
            "        i=0\n",
            "        while i<len(filtered):\n",
            "            if i+1<len(filtered) and filtered[i]==filtered[i+1]:\n",
            "                res.append(filtered[i]*2); i+=2\n",
            "            else:\n",
            "                res.append(filtered[i]); i+=1\n",
            "        return res+[0]*(len(line)-len(res))\n",
            "    best=None\n",
            "    best_score=-1\n",
            "    for d in \"WASD\":\n",
            "        nb=move(board,d)\n",
            "        score=sum(sum(row) for row in nb)\n",
            "        if score>best_score:\n",
            "            best_score=score; best=d\n",
            "    return best\n",
            "Timeout\n",
            "Steps = 1264 State = success\n",
            "def strategy(board):\n",
            "    # board is a 4x4 list of lists\n",
            "    import random\n",
            "    \n",
            "    # Directions with priority: diagonal corners\n",
            "    dirs = ['W', 'A', 'S', 'D']\n",
            "    for d in dirs:\n",
            "        new_board = [row[:] for row in board]\n",
            "        if d == 'W':\n",
            "            for j in range(4):\n",
            "                merged = False\n",
            "                for i in range(1, 4):\n",
            "                    if new_board[i][j] == new_board[i-1][j] and not merged:\n",
            "                        new_board[i-1][j] += new_board[i][j]\n",
            "                        new_board[i][j] = 0\n",
            "                        merged = True\n",
            "        elif d == 'S':\n",
            "            for j in range(4):\n",
            "                merged = False\n",
            "                for i in range(2, -1, -1):\n",
            "                    if new_board[i][j] == new_board[i+1][j] and not merged:\n",
            "                        new_board[i+1][j] += new_board[i][j]\n",
            "                        new_board[i][j] = 0\n",
            "                        merged = True\n",
            "        elif d == 'A':\n",
            "            for i in range(4):\n",
            "                merged = False\n",
            "                for j in range(1, 4):\n",
            "                    if new_board[i][j] == new_board[i][j-1] and not merged:\n",
            "                        new_board[i][j-1] += new_board[i][j]\n",
            "                        new_board[i][j] = 0\n",
            "                        merged = True\n",
            "        elif d == 'D':\n",
            "            for i in range(4):\n",
            "                merged = False\n",
            "                for j in range(2, -1, -1):\n",
            "                    if new_board[i][j] == new_board[i][j+1] and not merged:\n",
            "                        new_board[i][j+1] += new_board[i][j]\n",
            "                        new_board[i][j] = 0\n",
            "                        merged = True\n",
            "        # measure score: number of non-zero tiles\n",
            "        score = sum(1 for r in new_board for v in r if v != 0)\n",
            "        # choose first direction that reduces empty tiles\n",
            "        if score > sum(1 for r in board for v in r if v != 0):\n",
            "            return d\n",
            "    return random.choice(dirs)\n",
            "┌────┬────┬────┬────┬────┬────┐\n",
            "│\u001b[38;5;239m   .\u001b[0m│\u001b[38;5;239m   .\u001b[0m│\u001b[38;5;239m   .\u001b[0m│\u001b[38;5;45m   2\u001b[0m│\u001b[38;5;239m   .\u001b[0m│\u001b[38;5;239m   .\u001b[0m│\n",
            "├────┼────┼────┼────┼────┼────┤\n",
            "│\u001b[38;5;51m   4\u001b[0m│\u001b[38;5;239m   .\u001b[0m│\u001b[38;5;239m   .\u001b[0m│\u001b[38;5;239m   .\u001b[0m│\u001b[38;5;239m   .\u001b[0m│\u001b[38;5;239m   .\u001b[0m│\n",
            "├────┼────┼────┼────┼────┼────┤\n",
            "│\u001b[38;5;45m   2\u001b[0m│\u001b[38;5;46m  32\u001b[0m│\u001b[38;5;51m   4\u001b[0m│\u001b[38;5;239m   .\u001b[0m│\u001b[38;5;239m   .\u001b[0m│\u001b[38;5;239m   .\u001b[0m│\n",
            "├────┼────┼────┼────┼────┼────┤\n",
            "│\u001b[38;5;118m  64\u001b[0m│\u001b[38;5;51m   4\u001b[0m│\u001b[38;5;49m   8\u001b[0m│\u001b[38;5;239m   .\u001b[0m│\u001b[38;5;47m  16\u001b[0m│\u001b[38;5;46m  32\u001b[0m│\n",
            "├────┼────┼────┼────┼────┼────┤\n",
            "│\u001b[38;5;46m  32\u001b[0m│\u001b[38;5;46m  32\u001b[0m│\u001b[38;5;45m   2\u001b[0m│\u001b[38;5;45m   2\u001b[0m│\u001b[38;5;226m 256\u001b[0m│\u001b[38;5;51m   4\u001b[0m│\n",
            "├────┼────┼────┼────┼────┼────┤\n",
            "│\u001b[38;5;51m   4\u001b[0m│\u001b[38;5;47m  16\u001b[0m│\u001b[38;5;51m   4\u001b[0m│\u001b[38;5;196m2048\u001b[0m│\u001b[38;5;51m   4\u001b[0m│\u001b[38;5;45m   2\u001b[0m│\n",
            "└────┴────┴────┴────┴────┴────┘\n",
            "Exception = '>' not supported between instances of 'int' and 'str'\n",
            "Exception = cannot pickle 'generator' object\n",
            "Timeout\n",
            "def strategy(board):\n",
            "    def move(board, direction):\n",
            "        size = len(board)\n",
            "        def compress(line):\n",
            "            new = [x for x in line if x>0]\n",
            "            merged = []\n",
            "            i=0\n",
            "            while i < len(new):\n",
            "                if i+1 < len(new) and new[i]==new[i+1]:\n",
            "                    merged.append(new[i]*2)\n",
            "                    i+=2\n",
            "                else:\n",
            "                    merged.append(new[i])\n",
            "                    i+=1\n",
            "            return merged+[0]*(size-len(merged))\n",
            "        new_board=[[0]*size for _ in range(size)]\n",
            "        if direction=='W':\n",
            "            for j in range(size):\n",
            "                col=[board[i][j] for i in range(size)]\n",
            "                col=compress(col)\n",
            "                for i in range(size):\n",
            "                    new_board[i][j]=col[i]\n",
            "        elif direction=='S':\n",
            "            for j in range(size):\n",
            "                col=[board[i][j] for i in range(size)][::-1]\n",
            "                col=compress(col)[::-1]\n",
            "                for i in range(size):\n",
            "                    new_board[i][j]=col[i]\n",
            "        elif direction=='A':\n",
            "            for i in range(size):\n",
            "                row=compress(board[i])\n",
            "                new_board[i]=row\n",
            "        elif direction=='D':\n",
            "            for i in range(size):\n",
            "                row=compress(board[i][::-1])[::-1]\n",
            "                new_board[i]=row\n",
            "        return new_board\n",
            "\n",
            "    def score(b):\n",
            "        return sum(sum(1 for x in row if x>0) for row in b)\n",
            "\n",
            "    best=None\n",
            "    bestScore=-1\n",
            "    for d in \"WASD\":\n",
            "        nb=move(board,d)\n",
            "        s=score(nb)\n",
            "        if s>bestScore:\n",
            "            bestScore=s\n",
            "            best=d\n",
            "    return best\n",
            "Timeout\n",
            "Timeout\n",
            "Timeout\n",
            "Timeout\n",
            "Timeout\n",
            "None\n",
            "Timeout\n",
            "Exception = list assignment index out of range\n",
            "Timeout\n",
            "None\n",
            "Timeout\n"
          ]
        }
      ],
      "source": [
        "trainer.train()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "tlaUdxC_VHpz"
      },
      "source": [
        "<a name=\"Inference\"></a>\n",
        "# Inference\n",
        "Now let's try the model we just trained!"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 31,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "8BZZHOKiF9Ct",
        "outputId": "4989f8d9-d024-462e-c732-b7734676791a"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "<|start|>system<|message|>You are ChatGPT, a large language model trained by OpenAI.\n",
            "Knowledge cutoff: 2024-06\n",
            "Current date: 2025-10-06\n",
            "\n",
            "Reasoning: low\n",
            "\n",
            "# Valid channels: analysis, commentary, final. Channel must be included for every message.\n",
            "Calls to these tools must go to the commentary channel: 'functions'.<|end|><|start|>user<|message|>Create a new short 2048 strategy using only native Python code.\n",
            "You are given a list of list of numbers for the current board state.\n",
            "Output one action for \"W\", \"A\", \"S\", \"D\" on what is the optimal next step.\n",
            "Output your new short function in backticks using the format below:\n",
            "```python\n",
            "def strategy(board):\n",
            "    return \"W\" # Example\n",
            "```\n",
            "All helper functions should be inside def strategy. Only output the short function `strategy`.<|end|><|start|>assistant<|channel|>analysis<|message|>We need a short strategy that picks best move using basic heuristics. Use simple scoring: prefer moving to increase score: choose move that gives largest tile sum after simulation. Write quick function.<|end|><|start|>assistant<|channel|>final<|message|>```python\n",
            "def strategy(board):\n",
            "    import itertools\n",
            "    dirs = [\"W\",\"A\",\"S\",\"D\"]\n",
            "    best_dir = None\n",
            "    best_val = -1\n",
            "    for d in dirs:\n",
            "        new_board = [row[:] for row in board]\n",
            "        moved = False\n",
            "        if d == \"W\":\n",
            "            for col in range(4):\n",
            "                temp = [new_board[r][col] for r in range(4) if new_board[r][col]]\n",
            "                merged = []\n",
            "                i=0\n",
            "                while i<len(temp):\n",
            "                    if i+1<len(temp) and temp[i]==temp[i+1]:\n",
            "                        merged.append(temp[i]*2); i+=2\n",
            "                    else:\n",
            "                        merged.append(temp[i]); i+=1\n",
            "                for r in range(4):\n",
            "                    new_board[r][col]=merged[r] if r<len(merged) else 0\n",
            "        elif d == \"S\":\n",
            "            for col in range(4):\n",
            "                temp = [new_board[r][col] for r in range(4) if new_board[r][col]]\n",
            "                merged = []\n",
            "                i=len(temp)-1\n",
            "                while i>=0:\n",
            "                    if i-1>=0 and temp[i]==temp[i-1]:\n",
            "                        merged.insert(0,temp[i]*2); i-=2\n",
            "                    else:\n",
            "                        merged.insert(0,temp[i]); i-=1\n",
            "                for r in range(4):\n",
            "                    new_board[r][col]=merged[r] if r<len(merged) else 0\n",
            "        elif d == \"A\":\n",
            "            for r in range(4):\n",
            "                temp = [new_board[r][c] for c in range(4) if new_board[r][c]]\n",
            "                merged = []\n",
            "                i=0\n",
            "                while i<len(temp):\n",
            "                    if i+1<len(temp) and temp[i]==temp[i+1]:\n",
            "                        merged.append(temp[i]*2); i+=2\n",
            "                    else:\n",
            "                        merged.append(temp[i]); i+=1\n",
            "                for c in range(4):\n",
            "                    new_board[r][c]=merged[c] if c<len(merged) else 0\n",
            "        elif d == \"D\":\n",
            "            for r in range(4):\n",
            "                temp = [new_board[r][c] for c in range(4) if new_board[r][c]]\n",
            "                merged = []\n",
            "                i=len(temp)-1\n",
            "                while i>=0:\n",
            "                    if i-1>=0 and temp[i]==temp[i-1]:\n",
            "                        merged.insert(0,temp[i]*2); i-=2\n",
            "                    else:\n",
            "                        merged.insert(0,temp[i]); i-=1\n",
            "                for c in range(4):\n",
            "                    new_board[r][c]=merged[c] if c<len(merged) else 0\n",
            "        val = sum(map(sum,new_board))\n",
            "        if val>best_val:\n",
            "            best_val, best_dir = val, d\n",
            "    return best_dir\n",
            "```<|return|>\n"
          ]
        }
      ],
      "source": [
        "text = tokenizer.apply_chat_template(\n",
        "    [{\"role\": \"user\", \"content\": prompt}],\n",
        "    tokenize = False,\n",
        "    add_generation_prompt = True,\n",
        "    reasoning_effort = \"low\",\n",
        ")\n",
        "\n",
        "from transformers import TextStreamer\n",
        "_ = model.generate(\n",
        "    **tokenizer(text, return_tensors = \"pt\").to(\"cuda\"),\n",
        "    temperature = 1.0,\n",
        "    max_new_tokens = 1024,\n",
        "    streamer = TextStreamer(tokenizer, skip_prompt = False),\n",
        ")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "-NUEmHFSYNTp"
      },
      "source": [
        "<a name=\"Save\"></a>\n",
        "### Saving to float16 or `MXFP4`\n",
        "\n",
        "We also support saving to `float16` directly. Select `merged_16bit` for float16 or `mxfp4` for MXFP4 (OpenAI's GPT-OSS native precision). We also allow `lora` adapters as a fallback. Use `push_to_hub_merged` to upload to your Hugging Face account! You can go to https://huggingface.co/settings/tokens for your personal tokens."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 32,
      "metadata": {
        "id": "NjXGTkp7YNtB"
      },
      "outputs": [],
      "source": [
        "# Merge and push to hub in mxfp4 4bit format\n",
        "if False:\n",
        "    model.save_pretrained_merged(\"finetuned_model\", tokenizer, save_method = \"mxfp4\")\n",
        "if False:\n",
        "    model.push_to_hub_merged(\"repo_id/repo_name\", tokenizer, token = \"hf...\", save_method = \"mxfp4\")\n",
        "\n",
        "# Merge and push to hub in 16bit\n",
        "if False:\n",
        "    model.save_pretrained_merged(\"finetuned_model\", tokenizer, save_method = \"merged_16bit\")\n",
        "if False: # Pushing to HF Hub\n",
        "    model.push_to_hub_merged(\"hf/gpt-oss-finetune\", tokenizer, save_method = \"merged_16bit\", token = \"\")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "V15Yhj1V9lwG"
      },
      "source": [
        "# And we're done!\n",
        "Congratulations you just learned how to do reinforcement learning with GPT-OSS! There were some advanced topics explained in this notebook - to learn more about GPT-OSS and RL, there are more docs in Unsloth's [Reinforcement Learning Guide with GPT-OSS](https://docs.unsloth.ai/new/gpt-oss-reinforcement-learning)\n",
        "\n",
        "This notebook and all Unsloth notebooks are licensed [LGPL-3.0](https://github.com/unslothai/notebooks?tab=LGPL-3.0-1-ov-file#readme)."
      ]
    }
  ],
  "metadata": {
    "accelerator": "GPU",
    "colab": {
      "gpuType": "T4",
      "include_colab_link": true,
      "provenance": []
    },
    "kernelspec": {
      "display_name": "Python 3",
      "name": "python3"
    },
    "language_info": {
      "name": "python"
    },
    "widgets": {
      "application/vnd.jupyter.widget-state+json": {
        "02d120e49f2c4f95a6090b1d8d521767": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_dbf5ed93dac646ed979fa7a8c569dfe3",
            "placeholder": "​",
            "style": "IPY_MODEL_4db5ee5b7b674abba75fbce264e6dfa3",
            "value": " 165/165 [00:00&lt;00:00, 17.9kB/s]"
          }
        },
        "04d39c4dda9f4a1bb01b8d6320032372": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "06ab9eaa6f0f48c4b68cff1ca4b9f2fa": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "07f0420c4dfa477caccd7ae96551c2e4": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_ad75f887a140416abfca615b2fc3c385",
            "max": 3996690997,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_dee02a37a6f44f168546ee0077dc20d1",
            "value": 3996690997
          }
        },
        "0ac4d8e674804ad6bdc5f2d62f2e0d33": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_7bfcd9acf29646db8b6123708d1ffe27",
              "IPY_MODEL_5e88d6515f16475fb72d7c153422b591",
              "IPY_MODEL_5e5b77dd649547f896ab306fccc94a4e"
            ],
            "layout": "IPY_MODEL_a843fa23e6c94fb486bff8764574fdc5"
          }
        },
        "0c0c96eeac664f339aa4511bf47087e2": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_18451e19df5449b1853b5e13dacd19c5",
              "IPY_MODEL_d864d29d02c54ecfaedd7b866a6df8c2",
              "IPY_MODEL_7875163297284832a35aca84cbb105ce"
            ],
            "layout": "IPY_MODEL_d42d8228ea1247a1a81bb99b18c4640c"
          }
        },
        "0f99489932aa409b94ba34764aff19b0": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "1183d3f2ad3c4fb0af1d925b5f9e3efe": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_9cc51d8029eb4217bc37daa918649692",
              "IPY_MODEL_41f13d2f023e405180689e03bc2c32a1",
              "IPY_MODEL_247484c0bf5945bcb4627b48928366c8"
            ],
            "layout": "IPY_MODEL_14c0f20a9ab341ee966fe77815099ff0"
          }
        },
        "147743757c804b85af2ef194f5f84e6a": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "14c0f20a9ab341ee966fe77815099ff0": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "152d7bf2a74f400db3d3ecaa719ef8d1": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "18451e19df5449b1853b5e13dacd19c5": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_bcda4c9a48e943a6a0ef812fcd64a6db",
            "placeholder": "​",
            "style": "IPY_MODEL_61e491b843c347b6b2a9948de7caf01d",
            "value": "tokenizer_config.json: "
          }
        },
        "1c96edb2f7c948b9968b1239982af942": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_ee23056662ad4b719b65005d776e0e72",
            "placeholder": "​",
            "style": "IPY_MODEL_87765ca0996b403dbe29deef48d548bf",
            "value": " 4.00G/4.00G [01:42&lt;00:00, 117MB/s]"
          }
        },
        "219ca32ab51e4b4385b2c1026a78503a": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_6c2ccfe3363b40b58fc26ea164d4ead4",
              "IPY_MODEL_07f0420c4dfa477caccd7ae96551c2e4",
              "IPY_MODEL_1c96edb2f7c948b9968b1239982af942"
            ],
            "layout": "IPY_MODEL_d93be4994f104b6e99d89a9e73cd6abd"
          }
        },
        "245590db7d374515a428ff4abbd25588": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "247484c0bf5945bcb4627b48928366c8": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_cef064f1c55f41bf957fc4623260fdb4",
            "placeholder": "​",
            "style": "IPY_MODEL_37cbe8800af04a42a0355922969b6393",
            "value": " 4/4 [01:00&lt;00:00, 13.06s/it]"
          }
        },
        "263b7dc0b3fd465fac89b9266b19d526": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_147743757c804b85af2ef194f5f84e6a",
            "max": 4,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_2820e352ab004e818949acc31eb3888d",
            "value": 4
          }
        },
        "2820e352ab004e818949acc31eb3888d": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "2a6aa92676c74509b58373ca604c5b3b": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "2a6f43b64d164636a2d9708f0190f21b": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "2c40c6b846924200b29616a590af1672": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_06ab9eaa6f0f48c4b68cff1ca4b9f2fa",
            "placeholder": "​",
            "style": "IPY_MODEL_d98c2b1e979b4929891a8ee0c11f55df",
            "value": "model.safetensors.index.json: "
          }
        },
        "2fa84865e9f14c1491402ef81517b4bd": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "32d6af64f2464cfb965671f2692b4e15": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "34a9e38b0b454a69a067d1ddadec7626": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_9c4d6839934b4b13952a850d2084d498",
            "placeholder": "​",
            "style": "IPY_MODEL_c6a1decbc0e7421db622033214913cb9",
            "value": "Fetching 4 files: 100%"
          }
        },
        "350f29f737534bfba4258bc31ec274a2": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "36676899a61f4be4b631f6271f6ecec9": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "37cbe8800af04a42a0355922969b6393": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "3f9b801b52da4eb79f730d87bea5c338": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_b66c6ded549d4db8a2e5ea8e5016615c",
              "IPY_MODEL_43da5073c3ad4e98a3ade17a0bb3b93d",
              "IPY_MODEL_40365e2c9fef49148e4c93592d458afc"
            ],
            "layout": "IPY_MODEL_7e9d5212fc7844f286e14b70cbf0bc7a"
          }
        },
        "40138ff29073407abb95f793509fc320": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "40365e2c9fef49148e4c93592d458afc": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_2a6f43b64d164636a2d9708f0190f21b",
            "placeholder": "​",
            "style": "IPY_MODEL_65c62d2198e64ee4a9e6547c2733135a",
            "value": " 1.16G/1.16G [00:25&lt;00:00, 39.8MB/s]"
          }
        },
        "41f13d2f023e405180689e03bc2c32a1": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_36676899a61f4be4b631f6271f6ecec9",
            "max": 4,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_77ecad9f150c430fa85f5833d97c42df",
            "value": 4
          }
        },
        "43da5073c3ad4e98a3ade17a0bb3b93d": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_4513a73fa95b41b5b6edadc9143ba9c1",
            "max": 1158267008,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_792d75a7d18945e7972826ac5b2ac386",
            "value": 1158267008
          }
        },
        "4513a73fa95b41b5b6edadc9143ba9c1": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "48741bbdeccb459aa4eea9c61339764b": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "4b9b3fe8dc764eedb9e18f166fe2f548": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_87a808c4d4f54f719adcd29de7206e1b",
            "placeholder": "​",
            "style": "IPY_MODEL_5f0b2a0e1953406b88af2c884904e2da",
            "value": "model-00003-of-00004.safetensors: 100%"
          }
        },
        "4cb119127b404f46a53012c62d004e28": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "4d67b10ec7794170addb4e968e20f170": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "4da21f53bf7f4e2d8132eb43e6ecc739": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "4db5ee5b7b674abba75fbce264e6dfa3": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "4fbc4cfe529d471ba85f3ae8e53b28d6": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_a0d0fedc5bec4f5b943fddf9a954fbdf",
              "IPY_MODEL_cab602573c6940919f93e59fe6f4838d",
              "IPY_MODEL_51b8f4ce40f94ac39cf44d98f1522ec7"
            ],
            "layout": "IPY_MODEL_32d6af64f2464cfb965671f2692b4e15"
          }
        },
        "51aaa109480d4ae6bd419aea689d22ee": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "51b8f4ce40f94ac39cf44d98f1522ec7": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_60ceb890b5644493a8886d91b9dac461",
            "placeholder": "​",
            "style": "IPY_MODEL_40138ff29073407abb95f793509fc320",
            "value": " 446/446 [00:00&lt;00:00, 50.5kB/s]"
          }
        },
        "55ac5c2a82ee48fe988e1e4f26c168b0": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "5657a84bf4b74710b2de1a54f9236e39": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "596c2a62a635469eb74233ce00586a6f": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "59e46bbe96df4b88ad31c09096ce0e0a": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "5a59fb5f7acf4213847c985e66c9ee3c": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_81a728910a2341a785a6f252bbb371f7",
            "placeholder": "​",
            "style": "IPY_MODEL_69a8d50f11244ba688c183d14d2395ec",
            "value": "generation_config.json: 100%"
          }
        },
        "5b7af68130f04a63ad3efa3d9f602ebe": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_80fa3aef5e2040d9904c6b87b7214ca0",
            "placeholder": "​",
            "style": "IPY_MODEL_0f99489932aa409b94ba34764aff19b0",
            "value": " 4/4 [01:42&lt;00:00, 42.23s/it]"
          }
        },
        "5e5b77dd649547f896ab306fccc94a4e": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_59e46bbe96df4b88ad31c09096ce0e0a",
            "placeholder": "​",
            "style": "IPY_MODEL_8f5c7b88a2cc4b5abb0814c814833349",
            "value": " 15.1k/? [00:00&lt;00:00, 1.37MB/s]"
          }
        },
        "5e88d6515f16475fb72d7c153422b591": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_923653dfe90e475a9efa44baf98ba9a0",
            "max": 1,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_62600092f8cc43f493b86b0169f67be1",
            "value": 1
          }
        },
        "5ebe7b4e4ed24c53b783ee46377c682d": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_51aaa109480d4ae6bd419aea689d22ee",
            "max": 3998751275,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_acf4e50a248342f68d26daef21baa419",
            "value": 3998751275
          }
        },
        "5f0b2a0e1953406b88af2c884904e2da": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "60ceb890b5644493a8886d91b9dac461": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "614c5332c7d045109102a329e7f69dfd": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "61e491b843c347b6b2a9948de7caf01d": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "62600092f8cc43f493b86b0169f67be1": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "65c62d2198e64ee4a9e6547c2733135a": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "68ea891644ca4753a8e1bf278ff47e84": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "69a8d50f11244ba688c183d14d2395ec": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "6a47e60b10a6481b94aee021c8dbc7ba": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "6ab4e5676ad84807a126fffa99f7a0d4": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_e61ef80398444c13bf7cd20ef21a5057",
              "IPY_MODEL_5ebe7b4e4ed24c53b783ee46377c682d",
              "IPY_MODEL_e0fdef0087bc4a91a11932a2d933c001"
            ],
            "layout": "IPY_MODEL_596c2a62a635469eb74233ce00586a6f"
          }
        },
        "6c2ccfe3363b40b58fc26ea164d4ead4": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_4da21f53bf7f4e2d8132eb43e6ecc739",
            "placeholder": "​",
            "style": "IPY_MODEL_735f70fac43449e3974de1b783d56d33",
            "value": "model-00002-of-00004.safetensors: 100%"
          }
        },
        "735f70fac43449e3974de1b783d56d33": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "749e8407a901483c8b513a2fb71596c8": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_ef01b874478b4bb497d31d2f8dd6145a",
            "max": 1,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_d50ea8cded9848ffa18be1ae6a2559df",
            "value": 1
          }
        },
        "751a46fbb8e24efabfb381a85c90fbe8": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "77204d81ff8f4ee585361a503fa647dc": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "77d34c0f1de548b4872208a063bb5017": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "77ecad9f150c430fa85f5833d97c42df": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "7841bc90b6a74120ab3e603c76332a01": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "7875163297284832a35aca84cbb105ce": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_ba94310dc12a4a258205b14901ad3f94",
            "placeholder": "​",
            "style": "IPY_MODEL_a93210a691414502ba3c2dff03ffb4ce",
            "value": " 22.8k/? [00:00&lt;00:00, 1.66MB/s]"
          }
        },
        "792d75a7d18945e7972826ac5b2ac386": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "7baca79d720c40b5a923b9717e28c982": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_ffabf89ecd9d48a5a3fc2a1c855ce080",
            "placeholder": "​",
            "style": "IPY_MODEL_614c5332c7d045109102a329e7f69dfd",
            "value": " 1.19M/? [00:00&lt;00:00, 81.8MB/s]"
          }
        },
        "7bd5d1beeb0e49e293d9f6b91bb6d7fb": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "7bfcd9acf29646db8b6123708d1ffe27": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_fd0ac7ed3d3146ec85913f4e05c4a2f6",
            "placeholder": "​",
            "style": "IPY_MODEL_77204d81ff8f4ee585361a503fa647dc",
            "value": "chat_template.jinja: "
          }
        },
        "7d3379cbd27a4218a9d84c5a12f3bb88": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "7e9d5212fc7844f286e14b70cbf0bc7a": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "80fa3aef5e2040d9904c6b87b7214ca0": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "81a728910a2341a785a6f252bbb371f7": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "84d27c45065e426badbfcfcdc8ff16b6": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_4d67b10ec7794170addb4e968e20f170",
            "max": 27868174,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_55ac5c2a82ee48fe988e1e4f26c168b0",
            "value": 27868174
          }
        },
        "87765ca0996b403dbe29deef48d548bf": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "87a808c4d4f54f719adcd29de7206e1b": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "8c7c6bb04a3f4a1494b34529f95a195c": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "8db5e86577744ff1a39c8e198eee5dd3": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_4b9b3fe8dc764eedb9e18f166fe2f548",
              "IPY_MODEL_cca95e973bc445d3811335debf7c446e",
              "IPY_MODEL_e507a46b4c754d9a8aede2aac0d203bc"
            ],
            "layout": "IPY_MODEL_751a46fbb8e24efabfb381a85c90fbe8"
          }
        },
        "8f1e6c36b84c4115a671dcb9ade41c8b": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "8f5c7b88a2cc4b5abb0814c814833349": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "923653dfe90e475a9efa44baf98ba9a0": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": "20px"
          }
        },
        "9a079a30b4ae4bbc80122faf83e0ad59": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "9beac0680e3049dfafcb6ec185fd2265": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "9c4d6839934b4b13952a850d2084d498": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "9cc51d8029eb4217bc37daa918649692": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_a219f3b89a34443abe612846676f9356",
            "placeholder": "​",
            "style": "IPY_MODEL_152d7bf2a74f400db3d3ecaa719ef8d1",
            "value": "Loading checkpoint shards: 100%"
          }
        },
        "a0d0fedc5bec4f5b943fddf9a954fbdf": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_e1e77d98b01f4376a6c075975c27571e",
            "placeholder": "​",
            "style": "IPY_MODEL_6a47e60b10a6481b94aee021c8dbc7ba",
            "value": "special_tokens_map.json: 100%"
          }
        },
        "a219f3b89a34443abe612846676f9356": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "a843fa23e6c94fb486bff8764574fdc5": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "a93210a691414502ba3c2dff03ffb4ce": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "abe2b0a2913d4633943f44333ae799f8": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_2c40c6b846924200b29616a590af1672",
              "IPY_MODEL_749e8407a901483c8b513a2fb71596c8",
              "IPY_MODEL_7baca79d720c40b5a923b9717e28c982"
            ],
            "layout": "IPY_MODEL_68ea891644ca4753a8e1bf278ff47e84"
          }
        },
        "acda8e7582934fecbbf854e66e23f698": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "acf4e50a248342f68d26daef21baa419": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "ad75f887a140416abfca615b2fc3c385": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "ae6d42fb84fc4984af1d4430acdcd3c9": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_350f29f737534bfba4258bc31ec274a2",
            "max": 165,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_9beac0680e3049dfafcb6ec185fd2265",
            "value": 165
          }
        },
        "b07acf871a0a46f1889bfb439d13752b": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "b66c6ded549d4db8a2e5ea8e5016615c": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_77d34c0f1de548b4872208a063bb5017",
            "placeholder": "​",
            "style": "IPY_MODEL_bf96e8666c224c26b0a01451d08e907a",
            "value": "model-00004-of-00004.safetensors: 100%"
          }
        },
        "ba94310dc12a4a258205b14901ad3f94": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "bcda4c9a48e943a6a0ef812fcd64a6db": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "bf96e8666c224c26b0a01451d08e907a": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "c6a1decbc0e7421db622033214913cb9": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "cab602573c6940919f93e59fe6f4838d": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_5657a84bf4b74710b2de1a54f9236e39",
            "max": 446,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_7bd5d1beeb0e49e293d9f6b91bb6d7fb",
            "value": 446
          }
        },
        "caf742160db041a1b6c2cfdf78f2dc9a": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_34a9e38b0b454a69a067d1ddadec7626",
              "IPY_MODEL_263b7dc0b3fd465fac89b9266b19d526",
              "IPY_MODEL_5b7af68130f04a63ad3efa3d9f602ebe"
            ],
            "layout": "IPY_MODEL_2a6aa92676c74509b58373ca604c5b3b"
          }
        },
        "cca95e973bc445d3811335debf7c446e": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_2fa84865e9f14c1491402ef81517b4bd",
            "max": 3372033380,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_245590db7d374515a428ff4abbd25588",
            "value": 3372033380
          }
        },
        "cef064f1c55f41bf957fc4623260fdb4": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "d42d8228ea1247a1a81bb99b18c4640c": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "d50ea8cded9848ffa18be1ae6a2559df": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "d864d29d02c54ecfaedd7b866a6df8c2": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_dee07d33b8de4c3b847fcff670e68102",
            "max": 1,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_b07acf871a0a46f1889bfb439d13752b",
            "value": 1
          }
        },
        "d9020a2a2c8440db81d2cfdf0289b667": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "d93be4994f104b6e99d89a9e73cd6abd": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "d98c2b1e979b4929891a8ee0c11f55df": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "da4324e287e64e5ba98fc110693066df": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "dbf5ed93dac646ed979fa7a8c569dfe3": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "dbfeea8ee2374b8c8fa70431c35f281f": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_d9020a2a2c8440db81d2cfdf0289b667",
            "placeholder": "​",
            "style": "IPY_MODEL_04d39c4dda9f4a1bb01b8d6320032372",
            "value": "tokenizer.json: 100%"
          }
        },
        "dee02a37a6f44f168546ee0077dc20d1": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "dee07d33b8de4c3b847fcff670e68102": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": "20px"
          }
        },
        "e0fdef0087bc4a91a11932a2d933c001": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_7d3379cbd27a4218a9d84c5a12f3bb88",
            "placeholder": "​",
            "style": "IPY_MODEL_7841bc90b6a74120ab3e603c76332a01",
            "value": " 4.00G/4.00G [01:41&lt;00:00, 60.6MB/s]"
          }
        },
        "e1e77d98b01f4376a6c075975c27571e": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "e2973e6c02834a7c9f2f6ce5755f35f0": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "e507a46b4c754d9a8aede2aac0d203bc": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_e2973e6c02834a7c9f2f6ce5755f35f0",
            "placeholder": "​",
            "style": "IPY_MODEL_48741bbdeccb459aa4eea9c61339764b",
            "value": " 3.37G/3.37G [01:40&lt;00:00, 32.0MB/s]"
          }
        },
        "e61ef80398444c13bf7cd20ef21a5057": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_da4324e287e64e5ba98fc110693066df",
            "placeholder": "​",
            "style": "IPY_MODEL_8c7c6bb04a3f4a1494b34529f95a195c",
            "value": "model-00001-of-00004.safetensors: 100%"
          }
        },
        "ee23056662ad4b719b65005d776e0e72": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "ef01b874478b4bb497d31d2f8dd6145a": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": "20px"
          }
        },
        "f8dacdab001d4db0b6b3776ac7d3634a": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_5a59fb5f7acf4213847c985e66c9ee3c",
              "IPY_MODEL_ae6d42fb84fc4984af1d4430acdcd3c9",
              "IPY_MODEL_02d120e49f2c4f95a6090b1d8d521767"
            ],
            "layout": "IPY_MODEL_8f1e6c36b84c4115a671dcb9ade41c8b"
          }
        },
        "fa9ea0d3234e41689c827485d0360885": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_9a079a30b4ae4bbc80122faf83e0ad59",
            "placeholder": "​",
            "style": "IPY_MODEL_acda8e7582934fecbbf854e66e23f698",
            "value": " 27.9M/27.9M [00:00&lt;00:00, 44.5MB/s]"
          }
        },
        "fd0ac7ed3d3146ec85913f4e05c4a2f6": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "fd2fe9ef6da64f72ab29d481d1739f5e": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_dbfeea8ee2374b8c8fa70431c35f281f",
              "IPY_MODEL_84d27c45065e426badbfcfcdc8ff16b6",
              "IPY_MODEL_fa9ea0d3234e41689c827485d0360885"
            ],
            "layout": "IPY_MODEL_4cb119127b404f46a53012c62d004e28"
          }
        },
        "ffabf89ecd9d48a5a3fc2a1c855ce080": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "state": {}
      }
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}
